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; } i12($arr);

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.2.00.0000.02425.46
7.1.70.0070.02123.29
7.1.60.0030.04823.10
7.1.50.0100.03922.77
7.1.00.0030.10028.21
7.0.200.0230.02022.64
7.0.140.0000.09328.15
7.0.100.0230.08724.86
7.0.90.0570.09724.76
7.0.80.0300.06724.79
7.0.70.0130.09324.75
7.0.60.0100.07024.95
7.0.50.0130.09725.24
7.0.40.0030.06724.05
7.0.30.0300.04723.87
7.0.20.0030.05723.82
7.0.10.0030.07323.91
7.0.00.0170.05323.91
5.6.280.0030.12735.02
5.6.250.0130.11734.66
5.6.240.0230.09734.55
5.6.230.0200.12034.71
5.6.220.0130.12734.68
5.6.210.0200.11734.62
5.6.200.0070.12335.13
5.6.190.0070.10334.97
5.6.180.0070.07335.22
5.6.170.0030.07735.06
5.6.160.0070.08334.98
5.6.150.0100.09735.12
5.6.140.0130.06335.11
5.6.130.0100.07735.14
5.6.120.0170.06335.14
5.6.110.0130.06035.05
5.6.100.0070.07735.05
5.6.90.0030.07735.13
5.6.80.0070.07034.46
5.6.70.0030.07334.47
5.6.60.0000.07734.52
5.6.50.0170.06034.36
5.6.40.0100.11334.57
5.6.30.0200.10734.43
5.6.20.0100.11734.36
5.6.10.0200.08334.51
5.6.00.0130.11034.49
5.5.380.0000.10334.61
5.5.370.0200.11334.54
5.5.360.0100.11034.52
5.5.350.0200.09034.46
5.5.340.0100.11734.78
5.5.330.0130.07734.84
5.5.320.0070.08334.96
5.5.310.0030.08034.82
5.5.300.0100.08034.81
5.5.290.0200.06334.86
5.5.280.0130.07734.89
5.5.270.0070.07334.66
5.5.260.0030.07734.79
5.5.250.0100.07034.77
5.5.240.0100.06734.26
5.5.230.0100.07034.29
5.5.220.0030.07034.30
5.5.210.0130.10734.29
5.5.200.0000.13334.30
5.5.190.0170.11734.16
5.5.180.0100.15034.26
5.5.160.0130.10034.25
5.5.150.0230.10334.30
5.5.140.0330.12734.25
5.5.130.0030.10034.21
5.5.120.0130.10734.16
5.5.110.0100.11734.25
5.5.100.0200.11034.16
5.5.90.0170.12034.20
5.5.80.0130.12334.08
5.5.70.0130.11333.99
5.5.60.0070.11033.97
5.5.50.0130.12734.19
5.5.40.0200.10034.18
5.5.30.0130.11334.18
5.5.20.0070.11334.11
5.5.10.0130.10333.96
5.5.00.0030.09734.04
5.4.450.0000.07733.34
5.4.440.0130.09733.33
5.4.430.0000.08333.25
5.4.420.0070.07333.34
5.4.410.0070.07333.38
5.4.400.0030.07033.03
5.4.390.0170.07333.01
5.4.380.0100.10032.83
5.4.370.0100.06332.99
5.4.360.0130.12333.19
5.4.350.0100.11332.98
5.4.340.0200.11733.02
5.4.320.0130.11733.19
5.4.310.0100.10732.87
5.4.300.0170.11332.97
5.4.290.0100.12332.99
5.4.280.0100.10032.87
5.4.270.0100.11033.07
5.4.260.0130.10333.07
5.4.250.0070.11733.06
5.4.240.0100.07733.08
5.4.230.0130.09333.02
5.4.220.0070.10032.98
5.4.210.0100.11733.05
5.4.200.0200.11032.92
5.4.190.0200.11732.81
5.4.180.0200.08333.01
5.4.170.0230.11732.96
5.4.160.0070.08333.17
5.4.150.0070.12333.14
5.4.140.0070.11030.36
5.4.130.0200.07330.40
5.4.120.0270.09030.35
5.4.110.0170.12330.46
5.4.100.0270.10730.30
5.4.90.0030.11730.37
5.4.80.0100.12030.34
5.4.70.0030.12330.29
5.4.60.0170.10730.27
5.4.50.0130.10730.46
5.4.40.0100.10030.42
5.4.30.0200.11730.46
5.4.20.0030.11730.30
5.4.10.0130.12030.30
5.4.00.0230.10729.74
5.3.290.0170.11028.30
5.3.280.0130.12328.29
5.3.270.0130.11328.16
5.3.260.0170.11328.25
5.3.250.0170.10728.34
5.3.240.0100.11728.30
5.3.230.0200.11028.20
5.3.220.0430.08728.16
5.3.210.0070.11028.29
5.3.200.0100.12028.20
5.3.190.0170.12328.30
5.3.180.0030.10328.20
5.3.170.0230.11328.08
5.3.160.0070.13028.25
5.3.150.0170.09028.16
5.3.140.0130.13028.32
5.3.130.0130.12028.11
5.3.120.0170.10728.19
5.3.110.0330.09728.14
5.3.100.0100.11727.59
5.3.90.0070.13027.65
5.3.80.0230.08727.60
5.3.70.0100.11327.70
5.3.60.0070.09027.55
5.3.50.0100.12027.54
5.3.40.0200.10027.53
5.3.30.0200.11727.53
5.3.20.0070.12027.43
5.3.10.0170.10027.23
5.3.00.0030.13727.30
5.2.170.0130.11324.07
5.2.160.0100.11724.10
5.2.150.0070.13023.90
5.2.140.0030.13323.92
5.2.130.0070.12024.02
5.2.120.0100.12024.03
5.2.110.0070.11024.08
5.2.100.0100.10323.90
5.2.90.0100.12023.96
5.2.80.0070.12324.07
5.2.70.0100.13023.86
5.2.60.0070.08723.82
5.2.50.0130.13723.89
5.2.40.0030.11323.90
5.2.30.0070.13023.94
5.2.20.0070.11723.82
5.2.10.0200.10723.81
5.2.00.0130.11023.56
5.1.60.0030.12027.57
5.1.50.0100.08327.56
5.1.40.0100.12027.48
5.1.30.0100.09327.85
5.1.20.0030.12027.94
5.1.10.0100.07327.57
5.1.00.0270.10027.61
5.0.50.0170.12325.93
5.0.40.0100.13325.90
5.0.30.0100.15025.80
5.0.20.0170.13025.54
5.0.10.0100.13725.75
5.0.00.0200.13325.73
4.4.90.0130.11723.37
4.4.80.0100.15023.43
4.4.70.0100.14023.48
4.4.60.0170.08323.46
4.4.50.0070.12723.44
4.4.40.0100.13723.43
4.4.30.0030.13723.52
4.4.20.0170.12023.57
4.4.10.0130.13723.53
4.4.00.0070.15723.54
4.3.110.0170.11023.41
4.3.100.0130.12723.36
4.3.90.0070.13023.36
4.3.80.0230.11723.41
4.3.70.0100.11023.32
4.3.60.0030.12723.32
4.3.50.0070.13323.36
4.3.40.0100.15323.27
4.3.30.0070.13022.21
4.3.20.0070.31322.05
4.3.10.0030.24722.11
4.3.00.0000.30722.12

preferences:
31.35 ms | 400 KiB | 5 Q