3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.25, 5.4.0 - 5.4.15
Parse error: syntax error, unexpected ';' in /in/J8oPZ on line 13
Process exited with code 255.

preferences:
191.25 ms | 1395 KiB | 49 Q