Skip to content

Instantly share code, notes, and snippets.

@mgng mgng/json.php
Created Jun 5, 2012

Embed
What would you like to do?
<?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
You can’t perform that action at this time.