3v4l.org

run code in 300+ PHP versions simultaneously
<?php function write($str) { echo $str . '<br>'; } $arr = array(); for($i=0;$i<100000;$i++)$arr[$i]=mt_rand(1, 6); // 1~6の乱数を生成 write('*数字の配列を操作'); function i11($arr) { echo ’比較演算子1-1, PHP_EOL; $start = microtime(true); for($i=0;$i<100000;++$i)6==$arr[$i]; $end = microtime(true); echo $end - $start, PHP_EOL; } i11($arr); function i12($arr) { echo ’比較演算子1-2’, PHP_EOL; $start = microtime(true); for($i=0;$i<100000;++$i)6===$arr[$i]; $end = microtime(true); echo $end - $start, PHP_EOL; }

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)
5.4.270.0230.04718.96
5.4.260.0170.04719.00
5.4.250.0070.06319.02
5.4.240.0130.05018.90
5.4.230.0170.04718.95
5.4.220.0100.06018.93
5.4.210.0200.06318.97
5.4.200.0100.05319.02
5.4.190.0070.07018.97
5.4.180.0130.07018.96
5.4.170.0170.05318.83
5.4.160.0270.05718.82
5.4.150.0070.05718.97
5.4.140.0100.06716.74
5.4.130.0100.05016.57
5.4.120.0170.06316.73
5.4.110.0030.05316.67
5.4.100.0030.07316.44
5.4.90.0130.06016.67
5.4.80.0130.05016.67
5.4.70.0200.05716.73
5.4.60.0100.07716.52
5.4.50.0170.06016.62
5.4.40.0230.05316.55
5.4.30.0130.05716.60
5.4.20.0130.06716.66
5.4.10.0170.05016.64
5.4.00.0130.05716.07
5.3.280.0070.06714.81
5.3.270.0070.05314.85
5.3.260.0100.05714.90
5.3.250.0130.05314.61
5.3.240.0130.06714.88
5.3.230.0070.05714.78
5.3.220.0100.07314.88
5.3.210.0070.07714.77
5.3.200.0100.05314.76
5.3.190.0070.05714.88
5.3.180.0170.06014.45
5.3.170.0200.06014.57
5.3.160.0130.06314.63
5.3.150.0100.06314.77
5.3.140.0100.06314.75
5.3.130.0100.07314.82
5.3.120.0170.07014.82
5.3.110.0030.06714.84
5.3.100.0170.05714.04
5.3.90.0100.06714.02
5.3.80.0100.05314.29
5.3.70.0200.04014.26
5.3.60.0070.05014.22
5.3.50.0130.06714.25
5.3.40.0030.06314.18
5.3.30.0130.05013.98
5.3.20.0130.05713.59
5.3.10.0070.04713.90
5.3.00.0070.07313.82

preferences:
143.44 ms | 1394 KiB | 7 Q