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); } return $input . str_repeat('o', 12 - $length); } 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.0060.01518.43
8.3.50.0140.00716.25
8.3.40.0120.00918.89
8.3.30.0090.00618.62
8.3.20.0070.00021.85
8.3.10.0040.00423.51
8.3.00.0040.00420.96
8.2.180.0140.00718.31
8.2.170.0140.00322.96
8.2.160.0090.00619.97
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00418.09
8.2.120.0070.00726.35
8.2.110.0030.01322.20
8.2.100.0110.00017.72
8.2.90.0050.00318.03
8.2.80.0000.00719.28
8.2.70.0000.00818.03
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0080.00019.25
8.2.30.0070.00019.30
8.2.20.0040.00418.06
8.2.10.0040.00419.27
8.2.00.0040.00419.36
8.1.280.0090.00625.92
8.1.270.0050.00523.89
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00621.99
8.1.230.0000.01120.84
8.1.220.0040.00417.74
8.1.210.0040.00418.84
8.1.200.0040.00417.35
8.1.190.0060.00617.23
8.1.180.0080.00018.10
8.1.170.0040.00418.57
8.1.160.0040.00418.88
8.1.150.0000.00718.81
8.1.140.0000.00720.80
8.1.130.0030.00720.07
8.1.120.0030.00617.49
8.1.110.0080.00017.47
8.1.100.0040.00417.46
8.1.90.0040.00417.50
8.1.80.0000.00817.37
8.1.70.0000.00817.36
8.1.60.0000.00817.64
8.1.50.0040.00417.60
8.1.40.0060.00317.63
8.1.30.0000.00817.77
8.1.20.0030.00617.59
8.1.10.0000.00917.64
8.1.00.0030.00517.47
8.0.300.0000.00720.03
8.0.290.0040.00416.75
8.0.280.0050.00318.55
8.0.270.0030.00317.38
8.0.260.0030.00318.45
8.0.250.0000.00716.95
8.0.240.0030.00317.00
8.0.230.0000.00617.00
8.0.220.0030.00316.88
8.0.210.0070.00016.86
8.0.200.0000.00616.89
8.0.190.0060.00316.96
8.0.180.0000.00717.01
8.0.170.0080.00016.94
8.0.160.0080.00017.04
8.0.150.0050.00316.91
8.0.140.0000.00716.82
8.0.130.0000.00813.36
8.0.120.0000.00716.78
8.0.110.0040.00416.91
8.0.100.0050.00216.84
8.0.90.0050.00216.98
8.0.80.0100.00816.98
8.0.70.0000.00816.88
8.0.60.0040.00417.01
8.0.50.0070.00017.00
8.0.30.0110.00717.25
8.0.20.0130.00717.40
8.0.10.0080.00016.74
8.0.00.0140.00716.78
7.4.330.0000.00715.55
7.4.320.0060.00016.43
7.4.300.0030.00316.62
7.4.290.0030.00316.41
7.4.280.0000.00716.49
7.4.270.0080.00016.58
7.4.260.0040.00416.47
7.4.250.0050.00216.59
7.4.240.0000.00716.62
7.4.230.0070.00016.41
7.4.220.0040.00416.49
7.4.210.0060.00916.63
7.4.200.0000.00716.65
7.4.160.0070.00916.61
7.4.140.0140.00817.86
7.4.130.0140.00416.56
7.4.120.0050.01116.35
7.4.110.0100.00716.55
7.4.100.0070.01016.54
7.4.90.0140.00416.66
7.4.80.0110.00619.39
7.4.70.0030.01316.50
7.4.60.0060.00916.54
7.4.50.0080.00416.56
7.4.40.0060.01316.57
7.4.00.0090.00614.81
7.3.330.0000.00513.17
7.3.320.0050.00013.25
7.3.310.0000.00716.20
7.3.300.0030.00316.17
7.3.290.0070.00016.34
7.3.280.0090.00416.27
7.3.260.0100.00816.46
7.3.240.0130.00516.52
7.3.230.0030.01516.78
7.3.210.0060.01016.59
7.3.200.0100.00616.54
7.3.190.0070.01016.46
7.3.180.0150.00316.38
7.3.170.0040.01616.62
7.3.160.0120.00316.55
7.3.00.1570.00014.69
7.2.330.0090.00916.36
7.2.320.0120.00916.52
7.2.310.0000.01616.73
7.2.300.0450.01016.65
7.2.290.0100.01016.37
7.2.130.1970.01315.05
7.2.120.1410.00315.21
7.2.110.1330.00314.89
7.2.100.2230.00714.96
7.2.90.1430.01015.20
7.2.80.1220.00315.34
7.2.70.0980.00715.05
7.2.60.1360.01015.15
7.2.50.1360.00615.21
7.2.40.1400.00315.29
7.2.30.1750.01015.29
7.2.20.1120.00715.12
7.2.10.1620.00315.18
7.2.00.1490.00315.01
7.1.250.1720.00713.85

preferences:
48.86 ms | 400 KiB | 5 Q