Last active
November 28, 2018 02:37
-
-
Save adrian-enspired/4b165cd0a1debe39aec6 to your computer and use it in GitHub Desktop.
print_r() is not helpful (in most cases, but especially for debugging) as it hides useful information from you. observe:
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 | |
$a = [ | |
"true", | |
true, | |
1, | |
"1", | |
"false", | |
false, | |
0, | |
"0", | |
"a string", | |
"a string ", | |
"a \x00\x00\x00string", | |
"Array | |
( | |
[0] => a | |
[1] => b | |
[2] => c | |
)", | |
"a string | |
[13] => Array | |
( | |
[0] => yeah, this is in fact still the same string as [12] | |
)" | |
]; | |
header("Content-type: text/plain"); | |
print_r($a); | |
var_dump($a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment