3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mt($start=null){ if ($start === null) return microtime(true); return number_format(microtime(true)-$start, 4); } $str_100k = str_repeat('a', 102400).str_repeat('b', 1024); $str = $str_100k; $needle = 'bbbbbbbbb'; $start = mt(); for ($i=0; $i<500; $i++) $j = strpos($str, $needle); // strpos $t_strpos = mt($start); #echo "\t".mt($start); $start = mt(); for ($i=0; $i<500; $i++) $j = stripos($str, $needle); // stripos $t_stripos = mt($start); #echo "\t".mt($start); echo number_format($t_stripos/$t_strpos, 1);

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.0100.07319.27
7.1.70.0000.07617.22
7.1.60.0100.12719.50
7.1.50.0070.09316.82
7.1.00.0030.16322.51
7.0.200.0000.08616.86
7.0.60.0070.16020.17
7.0.50.0070.17018.09
7.0.40.0000.16320.09
7.0.30.0270.10720.25
7.0.20.0170.14020.33
7.0.10.0030.12320.26
7.0.00.0030.17020.12
5.6.280.0070.12721.36
5.6.210.0100.11320.93
5.6.200.0030.09318.39
5.6.190.0070.11020.67
5.6.180.3730.07020.68
5.6.170.0230.08020.66
5.6.160.0170.12020.57
5.6.150.0070.13318.47
5.6.140.0000.11318.41
5.6.130.0000.10018.37
5.6.120.0100.10021.27
5.6.110.0030.13021.25
5.6.100.0100.11721.24
5.6.90.0130.12321.23
5.6.80.0070.10320.64
5.5.350.0370.11320.66
5.5.340.0070.06718.20
5.5.330.0100.12020.41
5.5.320.0200.08020.52
5.5.310.0330.11320.61
5.5.300.0030.07018.15
5.5.290.0030.07318.20
5.5.280.0030.09021.13
5.5.270.0030.13721.14
5.5.260.0200.12320.98
5.5.250.0100.12020.80
5.5.240.0070.05320.43
5.4.450.0030.09319.51
5.4.440.0030.06319.66
5.4.430.0070.07319.44
5.4.420.0070.11319.75
5.4.410.0170.12019.22
5.4.400.0100.10719.04
5.4.390.0270.09719.05
5.4.380.0200.11018.94
5.4.370.0070.11018.72
5.4.360.0130.10318.77
5.4.350.0100.11018.82
5.4.340.0200.10019.07
5.4.320.0230.12018.94
5.4.310.0130.12018.99
5.4.300.0030.14718.73
5.4.290.0170.10018.97
5.4.280.0100.12018.94
5.4.270.0130.10718.74
5.4.260.0200.10018.80
5.4.250.0130.10718.94
5.4.240.0200.10718.98
5.4.230.0100.11318.83
5.4.220.0170.11319.00
5.4.210.0100.11018.75
5.4.200.0330.09316.90
5.4.190.0130.11018.80
5.4.180.0130.11018.75
5.4.170.0130.10718.96
5.4.160.0070.11719.00
5.4.150.0100.11018.79
5.4.140.0270.09016.48
5.4.130.0030.11016.66
5.4.120.0230.09316.43
5.4.110.0170.10316.50
5.4.100.0100.10716.46
5.4.90.0100.10316.45
5.4.80.0000.11316.52
5.4.70.0100.13016.45
5.4.60.0130.10316.58
5.4.50.0200.12016.50
5.4.40.0030.13716.48
5.4.30.0130.10016.46
5.4.20.0100.11016.43
5.4.10.0100.10716.48
5.4.00.0100.11015.85
5.3.290.0130.13015.03
5.3.280.0030.11015.04
5.3.270.0070.11015.03
5.3.260.0170.10314.97
5.3.250.0130.13714.93
5.3.240.0070.11314.95
5.3.230.0170.10715.06
5.3.220.0130.11315.07
5.3.210.0100.11014.97
5.3.200.0170.12715.02
5.3.190.0200.10314.89
5.3.180.0130.10314.96
5.3.170.0100.10714.97
5.3.160.0170.10314.92
5.3.150.0100.11014.86
5.3.140.0030.13315.00
5.3.130.0100.10715.03
5.3.120.0100.11314.99
5.3.110.0000.11714.91
5.3.100.0200.10014.41
5.3.90.0070.13314.37
5.3.80.0130.10014.34
5.3.70.0100.11014.36
5.3.60.0170.10014.46
5.3.50.0130.11714.24
5.3.40.0100.10314.29
5.3.30.0130.10014.34
5.3.20.0070.11014.10
5.3.10.0100.10013.98
5.3.00.0100.10713.92
5.2.170.0100.11311.58
5.2.160.0030.10011.63
5.2.150.0130.09011.73
5.2.140.0000.10011.76
5.2.130.0130.08711.55
5.2.120.0030.11011.73
5.2.110.0030.09711.75
5.2.100.0070.09311.59
5.2.90.0130.08711.59
5.2.80.0000.09711.55
5.2.70.0030.10011.59
5.2.60.0130.09011.70
5.2.50.0070.10011.50
5.2.40.0070.10011.58
5.2.30.0130.09311.45
5.2.20.0100.09311.44
5.2.10.0070.09011.23
5.2.00.0030.09711.16
5.1.60.0070.09010.32
5.1.50.0030.09310.27
5.1.40.0030.09010.26
5.1.30.0100.09010.65
5.1.20.0030.09310.79
5.1.10.0100.11010.48
5.1.00.0070.14710.43
5.0.50.0030.0838.91
5.0.40.0030.0878.79
5.0.30.0170.0908.57
5.0.20.0170.1138.54
5.0.10.0000.0878.60
5.0.00.0030.1008.58
4.4.90.0030.0236.19
4.4.80.0000.0276.20
4.4.70.0000.0306.26
4.4.60.0030.0236.20
4.4.50.0030.0276.16
4.4.40.0030.0376.28
4.4.30.0070.0206.19
4.4.20.0070.0206.24
4.4.10.0000.0276.30
4.4.00.0030.0376.23
4.3.110.0070.0206.10
4.3.100.0000.0376.20
4.3.90.0000.0276.05
4.3.80.0000.0406.06
4.3.70.0030.0236.08
4.3.60.0070.0206.07
4.3.50.0000.0276.08
4.3.40.0030.0375.92
4.3.30.0070.0274.67
4.3.20.0100.0174.79
4.3.10.0070.0234.61
4.3.00.0000.01316.51

preferences:
30.68 ms | 400 KiB | 5 Q