3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 10000, '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.0070.73318.95
7.1.70.0030.74316.95
7.1.60.0100.82819.24
7.1.50.0230.79034.95
7.1.00.0071.28322.41
7.0.200.0100.79716.88
7.0.140.0070.76022.00
7.0.60.0130.77320.26
7.0.50.0000.73018.31
7.0.40.0130.74319.96
7.0.30.0370.76020.09
7.0.20.0270.72020.06
7.0.10.0170.74320.16
7.0.00.0070.79320.00
5.6.280.0072.49322.57
5.6.210.0002.48022.20
5.6.200.0102.49019.52
5.6.190.0032.47721.76
5.6.180.0202.48021.81
5.6.170.0332.46721.80
5.6.160.0102.49021.77
5.6.150.0032.48319.60
5.6.140.0032.49719.57
5.6.130.0072.49319.55
5.6.120.0132.48722.17
5.6.110.0172.48322.44
5.6.100.0032.49722.43
5.6.90.0102.49022.48
5.6.80.0032.49721.84
5.5.350.0302.42721.88
5.5.340.0232.35022.14
5.5.330.0332.39722.24
5.5.320.0232.43322.34
5.5.310.0272.38022.27
5.5.300.0402.38322.29
5.5.290.0272.41322.39
5.5.280.0202.37022.37
5.5.270.0332.38722.37
5.5.260.0232.40722.29
5.5.250.0532.35722.16
5.5.240.0202.44721.63
5.4.450.0372.42720.59
5.4.440.0202.45320.92
5.4.430.0172.41020.74
5.4.420.0202.41720.77
5.4.410.0332.38720.67
5.4.400.0232.37320.44
5.4.390.0302.29720.54
5.4.380.0332.34320.43
5.4.370.0302.42320.50
5.4.360.0232.43020.45
5.4.350.0302.39020.60
5.4.340.0032.48720.56
5.4.320.0202.40320.32
5.4.310.0102.44320.48
5.4.300.0172.41020.56
5.4.290.0132.45720.43
5.4.280.0132.43720.41
5.4.270.0232.43020.59
5.4.260.0432.38720.29
5.4.250.0302.40020.40
5.4.240.0272.37320.59
5.4.230.0202.40020.43
5.4.220.0272.41720.50
5.4.210.0202.40320.50
5.4.200.0202.44320.59
5.4.190.0302.37020.53
5.4.180.0332.40020.46
5.4.170.0232.39320.58
5.4.160.0202.39720.54
5.4.150.0132.44020.41
5.4.140.0102.44317.81
5.4.130.0332.41717.85
5.4.120.0272.41317.80
5.4.110.0202.44717.82
5.4.100.0302.44717.63
5.4.90.0232.40717.83
5.4.80.0272.40017.64
5.4.70.0272.41717.87
5.4.60.0302.39717.85
5.4.50.0272.44717.76
5.4.40.0202.43317.61
5.4.30.0332.36717.83
5.4.20.0172.41317.68
5.4.10.0202.39017.79
5.4.00.0332.43017.14
5.3.290.0272.38316.16
5.3.280.0202.43716.07
5.3.270.0132.41316.11
5.3.260.0272.42716.06
5.3.250.0472.38716.10
5.3.240.0172.44016.09
5.3.230.0432.39316.08
5.3.220.0272.40316.14
5.3.210.0202.42316.04
5.3.200.0472.33316.04
5.3.190.0232.36716.09
5.3.180.0272.41316.05
5.3.170.0202.39316.05
5.3.160.0172.38016.14
5.3.150.0302.38015.93
5.3.140.0172.36016.05
5.3.130.0272.41715.91
5.3.120.0172.46015.96
5.3.110.0632.39316.01
5.3.100.0202.40715.54
5.3.90.0432.39315.49
5.3.80.0332.41315.31
5.3.70.0132.42315.32
5.3.60.0332.40715.43
5.3.50.0172.44315.45
5.3.40.0272.43315.29
5.3.30.0532.39715.32
5.3.20.0532.35715.09
5.3.10.0272.32015.05
5.3.00.0332.41714.98
5.2.170.0102.38312.46
5.2.160.0202.42712.51
5.2.150.0332.35312.42
5.2.140.0432.31712.48
5.2.130.0072.41012.45
5.2.120.0172.41312.42
5.2.110.0272.25012.46
5.2.100.0332.40012.45
5.2.90.0172.36012.58
5.2.80.0172.43312.36
5.2.70.0172.44312.45
5.2.60.0032.46012.44
5.2.50.0302.41312.29
5.2.40.0372.40712.35
5.2.30.0272.42312.29
5.2.20.0302.38712.38
5.2.10.0132.40312.33
5.2.00.0272.41712.20
5.1.60.0332.40312.09
5.1.50.0032.43712.05
5.1.40.0432.40711.95
5.1.30.0072.42012.27
5.1.20.0332.38312.45
5.1.10.0132.42012.00
5.1.00.0232.39012.00
5.0.50.0172.44310.49
5.0.40.0102.43310.50
5.0.30.0302.42010.30
5.0.20.0102.43710.27
5.0.10.0302.41010.22
5.0.00.0102.41710.18
4.4.90.0080.0174.78
4.4.80.0090.0174.75
4.4.70.0100.0164.76
4.4.60.0070.0184.75
4.4.50.0060.0194.77
4.4.40.0100.0264.71
4.4.30.0080.0184.76
4.4.20.0060.0194.85
4.4.10.0060.0194.85
4.4.00.0070.0284.76
4.3.110.0060.0184.67
4.3.100.0060.0184.66
4.3.90.0060.0184.63
4.3.80.0090.0264.59
4.3.70.0070.0174.63
4.3.60.0070.0174.63
4.3.50.0050.0194.63
4.3.40.0100.0244.54
4.3.30.0080.0163.32
4.3.20.0040.0193.31
4.3.10.0050.0173.27
4.3.00.0070.01313.21

preferences:
38.38 ms | 401 KiB | 5 Q