3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $samplerequesturi = 'string(42) "{"ERROR_MSG":"Invalid path for user raol"}" '; $samplerequesturi = preg_replace('@^string\(\d{1,4}\)@', '', $samplerequesturi); var_dump($samplerequesturi); $js = json.decode($samplerequesturi); var_dump(js);
Output for 7.0.0 - 7.1.0
string(46) " "{"ERROR_MSG":"Invalid path for user raol"}" " Notice: Use of undefined constant json - assumed 'json' in /in/SC2nJ on line 5 Fatal error: Uncaught Error: Call to undefined function decode() in /in/SC2nJ:5 Stack trace: #0 {main} thrown in /in/SC2nJ on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
string(46) " "{"ERROR_MSG":"Invalid path for user raol"}" " Notice: Use of undefined constant json - assumed 'json' in /in/SC2nJ on line 5 Fatal error: Call to undefined function decode() in /in/SC2nJ on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
string(46) " "{"ERROR_MSG":"Invalid path for user raol"}" " Notice: Use of undefined constant json - assumed 'json' in /in/SC2nJ on line 5 Fatal error: Call to undefined function: decode() in /in/SC2nJ on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
string(46) " "{"ERROR_MSG":"Invalid path for user raol"}" " Notice: Use of undefined constant json - assumed 'json' in /in/SC2nJ on line 5 Fatal error: Call to undefined function: decode() in /in/SC2nJ on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(46) " "{"ERROR_MSG":"Invalid path for user raol"}" " Notice: Use of undefined constant json - assumed 'json' in /in/SC2nJ on line 5 Fatal error: Call to undefined function: decode() in /in/SC2nJ on line 5