3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = function() { $p = 'abcde'; $c = 'abc'; var_export(substr($p, 0, strlen($c)) == $c, true); } $s = microtime(1); for ($i =0; $i < 100; $i++) { $test(); } echo microtime(1) - $s;
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '$s' (T_VARIABLE) in /in/t4gOT on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/t4gOT on line 10
Process exited with code 255.

preferences:
202.51 ms | 1395 KiB | 56 Q