3v4l.org

run code in 300+ PHP versions simultaneously
<?php $samplerequesturi = 'string(42) "{"ERROR_MSG":"Invalid path for user raol"}" '; $samplerequesturi = preg_replace('@^string\(\d{1,4}\)@', '', $samplerequesturi); var_dump($samplerequesturi); var js = json.decode($samplerequesturi); var_dump(js);
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/1ZUn3 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VAR in /in/1ZUn3 on line 5
Process exited with code 255.

preferences:
178.08 ms | 1395 KiB | 56 Q