3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 1000, 'xxxxx'); $arr2 = 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); $first += ($end-$start); $start = microtime(true); foreach ($arr2 as &$value2) { strpos('xxxxxxx', $value2); } $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.4.10.0000.03215.11
7.4.00.0040.02714.90
7.3.130.0030.02414.85
7.3.120.0090.01914.98
7.3.110.0080.02114.75
7.3.100.0100.01715.06
7.3.90.0060.01914.91
7.3.80.0030.02014.93
7.3.70.0080.01715.06
7.3.60.0020.02114.77
7.3.50.0060.01914.92
7.3.40.0070.01714.88
7.3.30.0060.01715.02
7.3.20.0060.01916.11
7.3.10.0050.01916.21
7.3.00.0070.01916.12
7.2.260.0110.02215.24
7.2.250.0090.01915.01
7.2.240.0030.02414.84
7.2.230.0070.01814.99
7.2.220.0070.01715.20
7.2.210.0080.01815.12
7.2.200.0080.01815.16
7.2.190.0050.02015.09
7.2.180.0070.01815.13
7.2.170.0080.01615.08
7.2.160.0080.01815.08
7.2.150.0090.01616.40
7.2.140.0070.02016.40
7.2.130.0090.01616.40
7.2.120.0060.02216.52
7.2.110.0090.01816.44
7.2.100.0100.01816.38
7.2.90.0090.01516.45
7.2.80.0030.02216.59
7.2.70.0080.02116.40
7.2.60.0080.02016.46
7.2.50.0060.01816.57
7.2.40.0060.02316.41
7.2.30.0090.01816.55
7.2.20.0080.01916.40
7.2.10.0050.02116.53
7.2.00.0050.02017.11
7.1.330.0120.02415.21
7.1.320.0080.02215.20
7.1.310.0100.02815.15
7.1.300.0070.02515.17
7.1.290.0100.02215.23
7.1.280.0080.02615.20
7.1.270.0130.02015.06
7.1.260.0070.02715.11
7.1.250.0060.02715.41
7.1.240.0120.02315.24
7.1.230.0050.02515.24
7.1.220.0080.02315.14
7.1.210.0110.02315.20
7.1.200.0100.02115.31
7.1.190.0100.02415.27
7.1.180.0080.02415.17
7.1.170.0110.02015.11
7.1.160.0100.02115.23
7.1.150.0090.02115.27
7.1.140.0100.02215.08
7.1.130.0070.02415.21
7.1.120.0060.02615.22
7.1.110.0150.02015.32
7.1.100.0050.02715.17
7.1.90.0080.02415.24
7.1.80.0060.02715.05
7.1.70.0120.02215.66
7.1.60.0080.02716.29
7.1.50.0060.02815.68
7.1.40.0080.02414.93
7.1.30.0080.02315.16
7.1.20.0080.02415.09
7.1.10.0050.02615.20
7.1.00.0050.03916.93
7.0.330.0140.01914.83
7.0.320.0080.02814.85
7.0.310.0090.02414.76
7.0.300.0100.02214.85
7.0.290.0070.02414.79
7.0.280.0060.02514.62
7.0.270.0110.02214.79
7.0.260.0070.02514.75
7.0.250.0070.02614.81
7.0.240.0080.02814.88
7.0.230.0120.01914.85
7.0.220.0050.02414.74
7.0.210.0120.02814.70
7.0.200.0050.02015.26
7.0.190.0090.02514.80
7.0.180.0070.02614.93
7.0.170.0080.02214.70
7.0.160.0090.02314.74
7.0.150.0060.02714.79
7.0.140.0060.04216.59
7.0.130.0100.02114.68
7.0.120.0090.03616.59
7.0.110.0090.02614.86
7.0.100.0060.02214.74
7.0.90.0080.02314.72
7.0.80.0060.02714.73
7.0.70.0070.02514.77
7.0.60.0110.03916.27
7.0.50.0130.02415.46
7.0.40.0030.04415.20
7.0.30.0070.03615.22
7.0.20.0070.03415.22
7.0.10.0120.03615.14
7.0.00.0070.03215.19
5.6.400.0070.06114.26
5.6.390.0090.05914.52
5.6.380.0100.06414.47
5.6.370.0080.06414.64
5.6.360.0090.05914.41
5.6.350.0090.06014.49
5.6.340.0080.06214.49
5.6.330.0090.05614.53
5.6.320.0060.06014.38
5.6.310.0110.06314.34
5.6.300.0060.06214.64
5.6.290.0090.06014.33
5.6.280.0110.05414.38
5.6.270.0090.06214.49
5.6.260.0060.06414.44
5.6.250.0080.06514.43
5.6.240.0100.05314.44
5.6.230.0070.05914.40
5.6.220.0050.06014.52
5.6.210.0090.06316.17
5.6.200.0080.07215.32
5.6.190.0040.07816.11
5.6.180.0110.07415.92
5.6.170.0070.08015.82
5.6.160.0090.06215.91
5.6.150.0120.07115.78
5.6.140.0100.07615.90
5.6.130.0060.07015.94
5.6.120.0040.07715.94
5.6.110.0070.07615.92
5.6.100.0040.08015.92
5.6.90.0060.07715.85
5.6.80.0110.06915.68
5.6.70.0080.06815.58
5.6.60.0100.07415.75
5.6.50.0090.06715.64
5.6.40.0120.07115.69
5.6.30.0120.06815.69
5.6.20.0120.07215.78
5.6.10.0090.07915.62
5.6.00.0130.06815.70
5.5.380.0110.05714.26
5.5.370.0070.06214.43
5.5.360.0100.05814.42
5.5.350.0090.07715.92
5.5.340.0130.06915.26
5.5.330.0040.08015.78
5.5.320.0080.06615.74
5.5.310.0040.08715.89
5.5.300.0090.07315.88
5.5.290.0120.06915.70
5.5.280.0060.07215.73
5.5.270.0070.07015.83
5.5.260.0080.06815.88
5.5.250.0070.07515.77
5.5.240.0060.07515.60
5.5.230.0030.07615.65
5.5.220.0050.07815.55
5.5.210.0040.09015.64
5.5.200.0080.07715.78
5.5.190.0210.06515.68
5.5.180.0100.07215.66
5.5.170.0100.06014.17
5.5.160.0170.07015.70
5.5.150.0110.06715.53
5.5.140.0150.06415.62
5.5.130.0110.08215.60
5.5.120.0070.06615.59
5.5.110.0130.07315.71
5.5.100.0090.07915.66
5.5.90.0150.07715.51
5.5.80.0110.06615.48
5.5.70.0160.07315.45
5.5.60.0130.07515.54
5.5.50.0120.07615.50
5.5.40.0140.07315.57
5.5.30.0150.06915.60
5.5.20.0090.07015.79
5.5.10.0110.07415.51
5.5.00.0170.06815.52
5.4.450.0080.06514.15
5.4.440.0040.07714.09
5.4.430.0040.06814.23
5.4.420.0080.07014.26
5.4.410.0030.07514.19
5.4.400.0030.07214.07
5.4.390.0040.06914.13
5.4.380.0060.07114.04
5.4.370.0040.07514.15
5.4.360.0060.08214.06
5.4.350.0090.07114.16
5.4.340.0120.07114.05
5.4.330.0070.06312.42
5.4.320.0120.07014.05
5.4.310.0060.07914.02
5.4.300.0110.07314.13
5.4.290.0100.07414.09
5.4.280.0110.07914.05
5.4.270.0090.06414.08
5.4.260.0130.07714.12
5.4.250.0140.07114.06
5.4.240.0110.07514.11
5.4.230.0130.06914.08
5.4.220.0130.06014.10
5.4.210.0120.06614.08
5.4.200.0120.07114.05
5.4.190.0160.07114.12
5.4.180.0120.07114.04
5.4.170.0130.07113.99
5.4.160.0080.06813.99
5.4.150.0130.06614.02
5.4.140.0100.07513.43
5.4.130.0120.06313.46
5.4.120.0120.07213.36
5.4.110.0150.06813.42
5.4.100.0110.05813.44
5.4.90.0150.07513.39
5.4.80.0110.06913.36
5.4.70.0170.06813.38
5.4.60.0110.07613.37
5.4.50.0080.07413.40
5.4.40.0140.06613.50
5.4.30.0120.07213.41
5.4.20.0100.07613.47
5.4.10.0130.07213.43
5.4.00.0090.06813.34
5.3.290.0090.08813.01
5.3.280.0080.08812.93
5.3.270.0100.08112.99
5.3.260.0090.08112.98
5.3.250.0110.08112.98
5.3.240.0090.07712.90
5.3.230.0160.08012.89
5.3.220.0120.08712.90
5.3.210.0130.08512.90
5.3.200.0110.07512.88
5.3.190.0100.08512.84
5.3.180.0170.09312.92
5.3.170.0120.08212.98
5.3.160.0110.08213.01
5.3.150.0120.08112.89
5.3.140.0120.08312.94
5.3.130.0080.09612.91
5.3.120.0100.08612.97
5.3.110.0130.08612.90
5.3.100.0120.08712.81
5.3.90.0090.09012.81
5.3.80.0110.08912.77
5.3.70.0100.08712.78
5.3.60.0100.08712.81
5.3.50.0100.08812.81
5.3.40.0160.08612.74
5.3.30.0100.08312.83
5.3.20.0120.07712.62
5.3.10.0110.08712.69
5.3.00.0140.07512.64
5.2.170.0150.08012.77
5.2.160.0160.07012.77
5.2.150.0120.08712.77
5.2.140.0200.05712.77
5.2.130.0140.07212.77
5.2.120.0120.09212.77
5.2.110.0100.06612.77
5.2.100.0150.09012.77
5.2.90.0130.08212.77
5.2.80.0160.06212.77
5.2.70.0200.07612.77
5.2.60.0190.07012.77
5.2.50.0170.05512.77
5.2.40.0130.07712.77
5.2.30.0150.06712.77
5.2.20.0110.06012.77
5.2.10.0130.08312.77
5.2.00.0180.07212.77
5.1.60.0130.07612.77
5.1.50.0120.06712.77
5.1.40.0200.05812.77
5.1.30.0130.05612.77
5.1.20.0140.06212.77
5.1.10.0090.07512.77
5.1.00.0170.06712.77
5.0.50.0080.11212.77
5.0.40.0100.13612.77
5.0.30.0080.12812.77
5.0.20.0100.12112.77
5.0.10.0130.12212.77
5.0.00.0150.13012.77
4.4.90.0100.00712.77
4.4.80.0090.01312.77
4.4.70.0020.01212.77
4.4.60.0070.01112.77
4.4.50.0110.00812.77
4.4.40.0090.02112.77
4.4.30.0050.01512.77
4.4.20.0040.02112.77
4.4.10.0070.01612.77
4.4.00.0030.01612.77
4.3.110.0050.01712.77
4.3.100.0120.01312.77
4.3.90.0050.02012.77
4.3.80.0080.02512.77
4.3.70.0050.02012.77
4.3.60.0070.01112.77
4.3.50.0050.01812.77
4.3.40.0020.03012.77
4.3.30.0050.01712.77
4.3.20.0050.02012.77
4.3.10.0110.01412.77
4.3.00.0060.01812.77

preferences:
40.82 ms | 401 KiB | 5 Q