3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dumb(string $input): string { $length = mb_strlen($input); if ($length > 10) { return mb_substr($input, 0, 6); } while (mb_strlen($input) < 1000000) { $input .= 'o'; } return $input; } dumb('aaaaaaa'); // echo dumb('aaaaaaaaaaaaaaaaaaaa') . PHP_EOL; // echo dumb('aaaaaaa') . 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)
8.3.60.0171.98818.43
8.3.50.0071.99716.24
8.3.40.0071.99718.71
8.3.30.0032.00018.67
8.3.20.0031.99922.04
8.3.10.0031.99923.64
8.3.00.0071.99520.65
8.2.180.0271.96616.32
8.2.170.0101.99318.85
8.2.160.0131.98920.10
8.2.150.0031.99824.18
8.2.140.0071.99024.66
8.2.130.0031.99921.00
8.2.120.0002.00226.35
8.2.110.0002.00621.00
8.2.100.0101.99217.78
8.2.90.0001.99718.34
8.2.80.0071.99518.05
8.2.70.0101.99317.93
8.2.60.0031.99618.22
8.2.50.0071.99518.10
8.2.40.0071.99719.60
8.2.30.0002.00119.45
8.2.20.0032.00218.18
8.2.10.0031.99919.43
8.2.00.0032.00319.45
8.1.280.0101.99325.92
8.1.270.0071.99519.01
8.1.260.0071.99526.35
8.1.250.0031.99928.09
8.1.240.0032.00117.58
8.1.230.0002.00721.04
8.1.220.0071.99517.76
8.1.210.0031.99821.01
8.1.200.0071.99517.23
8.1.190.0071.99717.35
8.1.180.0002.00218.10
8.1.170.0032.00318.55
8.1.160.0031.99918.98
8.1.150.0002.00118.88
8.1.140.0002.00420.89
8.1.130.0002.00420.19
8.1.120.0071.99717.59
8.1.110.0031.99717.59
8.1.100.0002.00417.57
8.1.90.0002.00317.64
8.1.80.0101.98917.60
8.1.70.0002.00217.47
8.1.60.0071.99317.69
8.1.50.0071.99317.68
8.1.40.0071.99417.79
8.1.30.0101.99217.91
8.1.20.0031.99917.78
8.1.10.0071.99517.64
8.1.00.0031.99817.60
8.0.300.0071.99319.61
8.0.290.0032.00116.63
8.0.280.0002.00818.58
8.0.270.0002.00217.33
8.0.260.0002.00718.51
8.0.250.0071.99416.96
8.0.240.0002.00316.98
8.0.230.0032.00116.95
8.0.220.0031.99616.90
8.0.210.0031.99916.91
8.0.200.0071.99517.04
8.0.190.0071.99517.00
8.0.180.0031.99917.01
8.0.170.0002.00616.91
8.0.160.0031.99817.00
8.0.150.0071.99516.91
8.0.140.0031.99716.89
8.0.130.0002.00413.46
8.0.120.0101.99316.86
8.0.110.0031.99916.80
8.0.100.0002.00216.89
8.0.90.0002.00316.86
8.0.80.0211.97516.87
8.0.70.0071.99616.75
8.0.60.0071.99416.95
8.0.50.0002.00116.80
8.0.30.0231.96917.29
8.0.20.0191.98817.30
8.0.10.0032.00017.04
8.0.00.0111.99416.86
7.4.330.0001.99815.55
7.4.320.0002.00416.58
7.4.300.0031.99816.46
7.4.290.0101.99116.43
7.4.280.0002.00116.62
7.4.270.0031.99316.50
7.4.260.0031.99816.55
7.4.250.0032.00216.47
7.4.240.0001.99916.61
7.4.230.0031.99416.40
7.4.220.0002.00316.50
7.4.210.0231.97616.57
7.4.200.0031.99816.59
7.4.160.0161.98216.47
7.4.140.0111.98817.86
7.4.130.0151.99916.64
7.4.120.0071.99316.35
7.4.110.0292.41716.45
7.4.100.0062.45416.59
7.4.90.0202.40516.38
7.4.80.0162.43719.39
7.4.70.0132.45216.54
7.4.60.0102.47016.59
7.4.50.0132.48416.37
7.4.40.0132.41316.50
7.3.330.0031.99713.37
7.3.320.0071.99413.51
7.3.310.0002.00216.13
7.3.300.0002.00316.32
7.3.290.0002.00216.45
7.3.280.0111.99016.28
7.3.260.0121.99016.48
7.3.240.0101.99716.44
7.3.230.0381.96216.53
7.3.210.0162.44816.29
7.3.200.0032.45216.44
7.3.190.0162.44916.44
7.3.180.0062.46316.43
7.3.170.0102.46116.38
7.3.160.0162.45216.52
7.3.10.0502.42014.97
7.3.00.0772.39014.87
7.2.330.0072.45516.77
7.2.320.0232.44216.68
7.2.310.0232.45316.73
7.2.300.0132.45216.45
7.2.290.0192.37116.61
7.2.130.0432.43614.62
7.2.120.0492.43715.26
7.2.110.0432.44214.98
7.2.100.0472.43815.06
7.1.250.0602.41813.90

preferences:
63.02 ms | 401 KiB | 5 Q