Skip to content

Instantly share code, notes, and snippets.

Keirua

Block or report user

Report or block Keirua

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Keirua
Keirua / use-array_key_exists.php
Created Dec 13, 2016
Utilisez array_key_exists !
View use-array_key_exists.php
<?php
$a = ['AB' => 12, 'CB' => 34];
echo "Cas nominal : La clé est présente dans le tableau".PHP_EOL;
echo (int)array_key_exists('AB', $a).PHP_EOL;
echo (int)isset($a['AB']).PHP_EOL;
echo (int)!empty($a['AB']).PHP_EOL;
echo "Cas nominal : La clé n'est pas présente dans le tableau".PHP_EOL;
You can’t perform that action at this time.