3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $badValue = array( 'key1' => array( 'irrelevant' => array('nothere'), 'key2' => array( 'goodString' => 'OK', 'badString' => "\xc3\x28foo" ) ) ); $enc = json_encode($badValue); print_r(array('enc' => $enc, 'json_last_error' => json_last_error()); echo "\nafter";
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected ';' in /in/J8oPZ on line 13
Process exited with code 255.