Skip to content

Instantly share code, notes, and snippets.

@agallou
Last active August 29, 2015 14:02
Show Gist options
  • Save agallou/c10de27b56f33e3a60f7 to your computer and use it in GitHub Desktop.
Save agallou/c10de27b56f33e3a60f7 to your computer and use it in GitHub Desktop.
5.5 :
php -r "var_dump(json_decode('[\"test\"]' . 'invaliddata'));"
array(1) {
[0]=>
string(4) "test"
}
php -r "var_dump(json_decode('invaliddata' . '[\"test\"]'));"
NULL
5.4
php -r "var_dump(json_decode('[\"test\"]' . 'invaliddata'));"
NULL
php -r "var_dump(json_decode('invaliddata' . '[\"test\"]'));"
NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment