3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "aa\" b \x27 c"; $sum = 0; $inputs = explode("\n", $input); for($i = 0; $i<count($inputs); $i++){ $ns = addslashes($inputs[$i]); echo preg_match(preg_match("/\\[^\"]/",$ns); for($j = 0; $j<strlen($ns); $j++){ $sum++; echo $ns[$j]."|"; } if(preg_match("/\\[^\"]/",$ns)>0){ $sum+=2; } //$sum-= strlen($inputs[$i]); } echo $sum;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.00.0030.04720.18
5.6.160.0170.06320.57
5.6.150.0100.07018.27
5.6.140.0000.07018.18
5.6.130.0070.07018.29
5.6.120.0000.05721.02
5.6.110.0070.08721.04
5.6.100.0270.07321.14
5.6.90.0030.07021.13
5.6.80.0200.05320.40
5.5.300.0130.07717.97
5.5.290.0070.03717.94
5.5.280.0070.08320.73
5.5.270.0130.03020.72
5.5.260.0030.04020.97
5.5.250.0170.07720.74
5.5.240.4100.04320.15

preferences:
141.42 ms | 1394 KiB | 7 Q