3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 1000000, 'xxxxx'); $runs = 1000; $first = 0.0; $second = 0.0; for ($i =0; $i < $runs; $i++) { $start = microtime(true); foreach ($arr as $value) { strpos('xxxxxxx', $value); } $end = microtime(true); $first += ($end-$start); $start = microtime(true); foreach ($arr as &$value) { strpos('xxxxxxx', $value); } $end = microtime(true); $second += ($end-$start); } print "First: " . ($first/$runs) . PHP_EOL; print "Second: " . ($second/$runs) . 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.2.00.0202.48073.48
7.1.70.1602.34070.92
7.1.60.0132.48871.42
7.1.50.0232.47871.19
7.1.00.0072.49376.32
7.0.200.4771.87870.00
7.0.140.0032.49775.95
7.0.60.0832.41073.57
7.0.50.0302.45771.32
7.0.40.0272.47750.34
7.0.30.0832.41750.38
7.0.20.0802.42050.44
7.0.10.0972.40350.46
7.0.00.0272.47350.36
5.6.280.0170.11085.55
5.6.210.0300.11085.07
5.6.200.0230.07382.53
5.6.190.0400.11084.82
5.6.180.0700.10084.83
5.6.170.0700.08084.82
5.6.160.0100.10384.83
5.6.150.0230.11782.52
5.6.140.0400.10082.56
5.6.130.0270.11382.52
5.6.120.0200.11385.41
5.6.110.0270.08385.42
5.6.100.0100.07085.55
5.6.90.0370.10385.50
5.6.80.0400.07784.80
5.5.350.0330.10385.10
5.5.340.0170.08082.40
5.5.330.0330.10084.53
5.5.320.0170.06384.71
5.5.310.0230.07384.51
5.5.300.0370.10782.41
5.5.290.0370.09782.37
5.5.280.0230.06085.32
5.5.270.0300.10385.33
5.5.260.0470.09785.17
5.5.250.0430.10385.10
5.5.240.0570.08084.92
5.4.450.0970.05083.96
5.4.440.1570.09783.85
5.4.430.1500.08783.63
5.4.420.1600.09383.69
5.4.410.0470.08783.60
5.4.400.0670.09383.41
5.4.390.0670.06783.33
5.4.380.0730.06783.16
5.4.370.0530.08083.34
5.4.360.0500.09083.32
5.4.350.0570.09083.12
5.4.340.0600.07783.18
5.4.320.0210.05977.11
5.4.310.0240.05777.11
5.4.300.0240.05977.11
5.4.290.0250.05977.11
5.4.280.0210.05977.00
5.4.270.0160.06077.01
5.4.260.0200.05977.00
5.4.250.0190.06277.01
5.4.240.0230.05577.00
5.4.230.0190.06377.00
5.4.220.0310.04877.00
5.4.210.0270.05577.00
5.4.200.0250.05677.00
5.4.190.0200.06076.99
5.4.180.0260.05877.00
5.4.170.0730.07376.99
5.4.160.0720.07276.98
5.4.150.0770.06876.98
5.4.140.0690.07276.66
5.4.130.0730.07176.65
5.4.120.1000.10076.61
5.4.110.0730.06676.61
5.4.100.0730.06876.60
5.4.90.0730.06976.61
5.4.80.0710.07076.60
5.4.70.0760.06576.60
5.4.60.0750.06876.60
5.4.50.1080.09876.60
5.4.40.0910.06576.59
5.4.30.0720.08576.59
5.4.20.1130.09376.59
5.4.10.0690.07776.59
5.4.00.0770.07076.07
5.3.290.0290.06176.08
5.3.280.0290.07376.00
5.3.270.0930.09476.02
5.3.260.0770.07776.02
5.3.250.0840.06276.02
5.3.240.1560.17876.02
5.3.230.1090.10376.01
5.3.220.0800.06975.98
5.3.210.0710.07575.98
5.3.200.0650.08775.98
5.3.190.0860.09775.98
5.3.180.0780.06575.97
5.3.170.0940.08675.98
5.3.160.0740.07175.97
5.3.150.1420.12375.98
5.3.140.0660.07675.96
5.3.130.0660.07575.96
5.3.120.0620.08075.96
5.3.110.1010.10275.96
5.3.100.0770.06575.45
5.3.90.0800.06175.43
5.3.80.0790.06475.42
5.3.70.0700.07975.42
5.3.60.0750.06975.41
5.3.50.0680.07575.36
5.3.40.1040.09875.36
5.3.30.0560.08675.32
5.3.20.0750.07475.10
5.3.10.0880.06675.06
5.3.00.0860.09675.05
5.2.170.1050.12173.06
5.2.160.0690.09173.07
5.2.150.0650.08973.06
5.2.140.0880.09873.07
5.2.130.0730.08373.03
5.2.120.0770.08473.02
5.2.110.1110.11373.02
5.2.100.0750.08173.02
5.2.90.0690.08673.02
5.2.80.0650.08573.01
5.2.70.0770.08273.01
5.2.60.0730.08272.96
5.2.50.0650.10072.95
5.2.40.0850.11372.92
5.2.30.0790.08772.88
5.2.20.0670.10372.89
5.2.10.0780.07572.81
5.2.00.1132.037171.21
5.1.60.1231.827231.41
5.1.50.1371.987231.38
5.1.40.1571.657231.36
5.1.30.1301.833231.79
5.1.20.1501.760231.79
5.1.10.1271.943231.46
5.1.00.1131.670231.52
5.0.50.1172.077229.98
5.0.40.1232.360229.86
5.0.30.1402.363229.60
5.0.20.1402.330229.68
5.0.10.1232.323229.52
5.0.00.1302.343229.60
4.4.90.0090.0164.78
4.4.80.0090.0174.76
4.4.70.0090.0174.75
4.4.60.0100.0194.75
4.4.50.0310.0574.77
4.4.40.0090.0284.71
4.4.30.0260.0604.76
4.4.20.0090.0174.84
4.4.10.0040.0214.85
4.4.00.0180.0784.76
4.3.110.0080.0184.67
4.3.100.0050.0194.66
4.3.90.0060.0184.63
4.3.80.0060.0304.58
4.3.70.0070.0194.63
4.3.60.0100.0154.63
4.3.50.0090.0164.63
4.3.40.0060.0294.54
4.3.30.0300.0533.32
4.3.20.0060.0173.31
4.3.10.0060.0193.27
4.3.00.0270.02013.64

preferences:
40.45 ms | 400 KiB | 5 Q