3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 1000, 'xxxxx'); $runs = 100; $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); $second += ($end-$start); } 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.4.00.0070.01715.15
7.3.120.0070.02114.93
7.3.110.0070.01714.89
7.3.100.0100.01014.91
7.3.90.0040.01614.95
7.3.80.0060.00915.01
7.3.70.0070.01414.68
7.3.60.0030.01714.77
7.3.50.0070.01314.94
7.3.40.0100.01315.09
7.3.30.0040.01514.70
7.3.20.0070.01316.46
7.3.10.0110.01116.90
7.3.00.0070.01016.88
7.2.250.0030.02114.97
7.2.240.0070.02015.06
7.2.230.0060.01615.31
7.2.220.0030.01215.27
7.2.210.0000.01815.18
7.2.200.0070.01315.26
7.2.190.0060.01215.18
7.2.180.0070.01615.19
7.2.170.0060.01615.20
7.2.00.0000.01519.56
7.1.330.0000.02615.76
7.1.320.0090.01516.05
7.1.310.0000.01715.71
7.1.300.0040.01815.82
7.1.290.0000.02415.86
7.1.280.0030.02015.80
7.1.270.0070.01715.86
7.1.260.0060.01615.69
7.1.70.0000.01117.24
7.1.60.0070.02619.32
7.1.50.0090.02217.07
7.1.00.0030.08322.51
7.0.200.0090.00516.61
7.0.140.0030.07721.93
7.0.60.0070.07319.94
7.0.50.0170.08017.90
7.0.40.0100.07720.25
7.0.30.0270.07320.17
7.0.20.0270.04020.04
7.0.10.0400.08019.99
7.0.00.0070.07020.04
5.6.280.0030.10021.07
5.6.210.0100.10320.51
5.6.200.0000.11318.18
5.6.190.0100.05020.56
5.6.180.0000.05720.45
5.6.170.0230.06320.71
5.6.160.0130.09720.51
5.6.150.0070.11018.12
5.6.140.0130.10018.11
5.6.130.0100.09318.20
5.6.120.0070.05321.05
5.6.110.0100.10721.16
5.6.100.0070.10720.92
5.6.90.0130.09720.99
5.6.80.0070.08320.40
5.6.70.4330.05720.41
5.5.350.0000.10320.47
5.5.340.0030.09317.86
5.5.330.0000.06320.23
5.5.320.0170.08320.31
5.5.310.0270.10020.30
5.5.300.0070.06317.99
5.5.290.0170.08317.95
5.5.280.0100.07020.84
5.5.270.0270.08320.89
5.5.260.0170.06320.91
5.5.250.0200.09320.61
5.5.240.0270.08020.38
5.4.450.0000.04719.23
5.4.440.0230.05319.26
5.4.430.0430.06019.41
5.4.420.0400.06319.13
5.4.410.0230.07018.97
5.4.400.0370.08318.63
5.4.390.0100.10718.80
5.4.380.0100.08018.79
5.4.370.0230.06718.62
5.4.360.0170.07018.79
5.4.350.0100.08718.83
5.4.340.0130.07018.79
5.4.320.0090.05812.60
5.4.310.0090.06712.59
5.4.300.0110.07012.60
5.4.290.0080.06912.59
5.4.280.0070.04912.49
5.4.270.0100.05112.49
5.4.260.0030.05912.49
5.4.250.0090.05412.49
5.4.240.0140.06212.49
5.4.230.0100.05512.48
5.4.220.0060.05312.48
5.4.210.0060.05912.48
5.4.200.0050.06112.48
5.4.190.0090.05812.48
5.4.180.0100.06612.48
5.4.170.0160.06512.48
5.4.160.0150.06312.47
5.4.150.0190.06112.47
5.4.140.0170.06212.15
5.4.130.0150.06312.14
5.4.120.0280.07812.09
5.4.110.0180.06212.10
5.4.100.0150.06612.09
5.4.90.0180.06412.09
5.4.80.0160.06912.09
5.4.70.0160.06412.09
5.4.60.0450.16812.09
5.4.50.0160.07212.09
5.4.40.0160.06312.07
5.4.30.0270.08912.07
5.4.20.0210.06212.08
5.4.10.0160.07012.08
5.4.00.0170.06511.57
5.3.290.0080.07112.88
5.3.280.0080.06612.81
5.3.270.0170.07512.82
5.3.260.0280.09412.82
5.3.250.0170.06912.81
5.3.240.0280.06412.81
5.3.230.0200.06612.81
5.3.220.0180.07112.77
5.3.210.0170.07612.77
5.3.200.0390.14612.77
5.3.190.0220.07312.78
5.3.180.0160.07712.77
5.3.170.0200.07312.77
5.3.160.0220.07012.77
5.3.150.0220.07312.77
5.3.140.0260.09412.76
5.3.130.0240.06812.76
5.3.120.0300.13312.76
5.3.110.0200.07512.75
5.3.100.0180.07512.25
5.3.90.0150.07212.23
5.3.80.0220.07212.21
5.3.70.0180.07212.22
5.3.60.0230.09312.20
5.3.50.0160.06712.15
5.3.40.0200.06912.15
5.3.30.0150.07012.11
5.3.20.0170.06611.89
5.3.10.0110.07411.86
5.3.00.0190.06611.84
5.2.170.0150.0569.35
5.2.160.0140.0579.35
5.2.150.0120.0599.35
5.2.140.0110.0599.34
5.2.130.0130.0559.30
5.2.120.0150.0549.30
5.2.110.0130.0579.30
5.2.100.0080.0619.30
5.2.90.0130.0579.30
5.2.80.0190.0829.29
5.2.70.0100.0649.30
5.2.60.0130.0569.25
5.2.50.0150.0559.22
5.2.40.0120.0589.20
5.2.30.0130.0549.17
5.2.20.0150.0559.16
5.2.10.0170.0529.11
5.2.00.0110.0618.96
5.1.60.0130.0468.30
5.1.50.0180.0778.30
5.1.40.0100.0518.29
5.1.30.0150.0548.63
5.1.20.0120.0528.66
5.1.10.0100.0538.39
5.1.00.0180.0448.38
5.0.50.0080.0716.86
5.0.40.0100.0686.72
5.0.30.0130.0756.54
5.0.20.0130.0946.51
5.0.10.0090.0676.49
5.0.00.0100.0766.48
4.4.90.0070.0214.78
4.4.80.0050.0204.75
4.4.70.0090.0164.75
4.4.60.0050.0204.75
4.4.50.0040.0204.77
4.4.40.0110.0544.70
4.4.30.0050.0214.76
4.4.20.0050.0204.85
4.4.10.0080.0174.84
4.4.00.0060.0294.76
4.3.110.0100.0154.67
4.3.100.0090.0154.66
4.3.90.0070.0174.64
4.3.80.0080.0274.58
4.3.70.0100.0144.63
4.3.60.0100.0144.63
4.3.50.0060.0194.63
4.3.40.0070.0274.54
4.3.30.0050.0183.32
4.3.20.0020.0213.31
4.3.10.0050.0193.27
4.3.00.0100.01015.45

preferences:
38.46 ms | 401 KiB | 5 Q