Created
June 5, 2012 09:01
-
-
Save mgng/2873733 to your computer and use it in GitHub Desktop.
This file contains 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 | |
$o = json_decode( '{ "a" : 1, "//" : 2 }' ); | |
echo $o->a; // 1 | |
echo $o->//; // Parse error: syntax error, unexpected $end, expecting T_STRING or T_VARIABLE or '{' or '$' | |
echo $o->{'//'}; // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment