Last active
August 29, 2015 13:56
-
-
Save elliotttf/9074809 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elliotttf@4kmba:~$ php /tmp/test.php | |
Notice: Undefined index: baz in /private/tmp/test.php on line 15 | |
Notice: Undefined index: baz in /private/tmp/test.php on line 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
$a = array( | |
'foo' => array( | |
'bar' => array() | |
) | |
); | |
if (isset($a['foo']['bar']['baz']['bang']['boom'])) { | |
print_r($a['foo']['bar']['baz']); | |
} | |
// Intentionally raise some notices so we know it's working... | |
print_r($a['foo']['bar']['baz']); | |
print_r($a['foo']['bar']['baz']['bang']); | |
echo PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment