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)
7.1.70.0070.01123.25
7.1.60.0100.02923.13
7.1.50.0030.04522.83
7.1.00.0070.09028.37
7.0.200.0240.01422.61
7.0.140.0030.09027.95
7.0.60.0070.05324.74
7.0.50.0130.08722.73
7.0.40.0070.09023.77
7.0.30.0430.09023.67
7.0.20.0370.06323.66
7.0.10.0300.05323.80
7.0.00.0070.09023.57
5.6.280.0100.11735.17
5.6.210.0030.07334.75
5.6.200.0100.08732.13
5.6.190.0100.12334.46
5.6.180.3030.08334.46
5.6.170.0400.10734.48
5.6.160.0200.08734.36
5.6.150.0200.11332.15
5.6.140.0170.11332.13
5.6.130.0170.11032.16
5.6.120.0230.10735.05
5.6.110.0070.06735.18
5.6.100.0230.11035.02
5.6.90.0100.08735.00
5.6.80.0100.11334.55
5.6.70.0400.09034.43
5.5.350.0070.12334.38
5.5.340.0170.07031.96
5.5.330.0100.07034.34
5.5.320.0400.09734.26
5.5.310.0230.11734.16
5.5.300.0170.09731.98
5.5.290.0030.09731.83
5.5.280.0170.07735.00
5.5.270.0170.06034.76
5.5.260.0200.10734.90
5.5.250.0130.11734.62
5.5.240.0070.06734.32
5.4.450.0170.10033.18
5.4.440.0430.11333.59
5.4.430.0230.09733.58
5.4.420.0100.10333.34
5.4.410.0100.11033.40
5.4.400.0130.10032.75
5.4.390.0170.11032.73
5.4.380.0630.09032.77
5.4.370.0200.09732.49
5.4.360.0300.08732.62
5.4.350.0330.08732.62
5.4.340.0300.14732.53
5.4.320.0130.06826.54
5.4.310.0160.06726.54
5.4.300.0150.06826.54
5.4.290.0100.07426.54
5.4.280.0110.06626.43
5.4.270.0230.11332.80
5.4.260.0500.12032.98
5.4.250.0270.11332.77
5.4.240.0130.12732.88
5.4.230.0230.11332.96
5.4.220.0200.15032.98
5.4.210.0170.10033.02
5.4.200.0330.09732.79
5.4.190.0200.13032.91
5.4.180.0200.10332.91
5.4.170.0230.11732.76
5.4.160.0070.12032.84
5.4.150.0170.15733.18
5.4.140.0270.12730.60
5.4.130.0130.12030.41
5.4.120.0370.12330.40
5.4.110.0100.14730.62
5.4.100.0170.14030.54
5.4.90.0170.10730.42
5.4.80.0030.12330.57
5.4.70.0230.13730.61
5.4.60.0230.10330.62
5.4.50.0330.12330.60
5.4.40.0300.14030.66
5.4.30.0270.13330.70
5.4.20.0130.14030.51
5.4.10.0230.13730.39
5.4.00.0200.10330.14
5.3.290.0170.07226.49
5.3.280.0300.13728.48
5.3.270.0170.12728.41
5.3.260.0030.11028.42
5.3.250.0230.14028.48
5.3.240.0100.11328.49
5.3.230.0330.13328.21
5.3.220.0130.15028.26
5.3.210.0300.14328.23
5.3.200.0300.14328.45
5.3.190.0330.13728.18
5.3.180.0230.13728.46
5.3.170.0170.12728.25
5.3.160.0270.09728.38
5.3.150.0170.15728.05
5.3.140.0370.11728.04
5.3.130.0230.13328.44
5.3.120.0330.11028.22
5.3.110.0170.13028.24
5.3.100.0170.13327.50
5.3.90.0170.14327.91
5.3.80.0200.14727.83
5.3.70.0270.13727.82
5.3.60.0270.14027.73
5.3.50.0170.14327.85
5.3.40.0230.15027.76
5.3.30.0270.11327.81
5.3.20.0270.13327.53
5.3.10.0300.12727.53
5.3.00.0300.10727.46
5.2.170.0200.11724.29
5.2.160.0230.15024.21
5.2.150.0130.10024.19
5.2.140.0130.11024.09
5.2.130.0170.09724.14
5.2.120.0230.15024.15
5.2.110.0300.11324.00
5.2.100.0130.15324.21
5.2.90.0170.12724.13
5.2.80.0370.10024.19
5.2.70.0130.15723.98
5.2.60.0170.13724.00
5.2.50.0170.14323.97
5.2.40.0330.13723.95
5.2.30.0370.16023.94
5.2.20.0230.11723.86
5.2.10.0100.12724.02
5.2.00.0200.14723.84
5.1.60.0170.10727.55
5.1.50.0170.15327.79
5.1.40.0170.11727.56
5.1.30.0200.13328.03
5.1.20.0130.14328.00
5.1.10.0200.14727.57
5.1.00.0230.11727.76
5.0.50.0170.16726.23
5.0.40.0230.20025.80
5.0.30.0300.14325.92
5.0.20.0270.16725.70
5.0.10.0100.14025.87
5.0.00.0230.18325.75
4.4.90.0230.19723.55
4.4.80.0170.18323.60
4.4.70.0170.19723.57
4.4.60.0170.20323.55
4.4.50.0170.14023.58
4.4.40.0130.18723.59
4.4.30.0130.13323.53
4.4.20.0200.15323.71
4.4.10.0100.21023.64
4.4.00.0330.19723.74
4.3.110.0170.18323.42
4.3.100.0070.15723.46
4.3.90.0100.14023.44
4.3.80.0270.18323.44
4.3.70.0100.15023.48
4.3.60.0100.14323.48
4.3.50.0230.12723.62
4.3.40.0200.21723.40
4.3.30.0070.15322.33
4.3.20.0570.42022.22
4.3.10.0600.45322.17
4.3.00.0200.34322.05

preferences:
36.98 ms | 400 KiB | 5 Q