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); } $newSymbols = 1000000 - $length; for ($i = 0; $i < $newSymbols; $i++) { $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.0170.03018.18
8.3.50.0130.03017.30
8.3.40.0140.03119.63
8.3.30.0070.03519.71
8.3.20.0090.01222.87
8.3.10.0100.01023.47
8.3.00.0070.01320.96
8.2.180.0100.04017.75
8.2.170.0170.03422.96
8.2.160.0100.02721.02
8.2.150.0040.01824.18
8.2.140.0100.01724.66
8.2.130.0130.03420.95
8.2.120.0070.01426.35
8.2.110.0030.02421.03
8.2.100.0070.02418.84
8.2.90.0030.02318.63
8.2.80.0060.01818.50
8.2.70.0040.02118.92
8.2.60.0030.02218.91
8.2.50.0000.02518.50
8.2.40.0040.02120.31
8.2.30.0030.02220.35
8.2.20.0030.02119.05
8.2.10.0070.02020.35
8.2.00.0080.01620.17
8.1.280.0140.02425.92
8.1.270.0070.01419.88
8.1.260.0100.01026.35
8.1.250.0000.02128.09
8.1.240.0090.01823.09
8.1.230.0070.02318.89
8.1.220.0030.02218.79
8.1.210.0000.02518.77
8.1.200.0040.02318.25
8.1.190.0000.02518.00
8.1.180.0000.02418.53
8.1.170.0000.02419.65
8.1.160.0030.02019.79
8.1.150.0090.01519.87
8.1.140.0000.02421.71
8.1.130.0030.02021.04
8.1.120.0000.02418.34
8.1.110.0070.02318.43
8.1.100.0040.02118.47
8.1.90.0040.02118.45
8.1.80.0090.01518.36
8.1.70.0000.02518.46
8.1.60.0030.02518.62
8.1.50.0030.03318.68
8.1.40.0060.02318.64
8.1.30.0030.02518.82
8.1.20.0030.02618.77
8.1.10.0060.02918.55
8.1.00.0070.02118.56
8.0.300.0000.02518.77
8.0.290.0130.01317.63
8.0.280.0060.01919.37
8.0.270.0000.02418.22
8.0.260.0030.02019.55
8.0.250.0070.02517.98
8.0.240.0030.02118.05
8.0.230.0030.02017.96
8.0.220.0060.02617.88
8.0.210.0000.02517.83
8.0.200.0000.02317.96
8.0.190.0000.02817.95
8.0.180.0060.02217.85
8.0.170.0030.03817.99
8.0.160.0000.02917.98
8.0.150.0070.02317.92
8.0.140.0000.02917.83
8.0.130.0030.02314.41
8.0.120.0030.02617.88
8.0.110.0070.02117.89
8.0.100.0030.02417.97
8.0.90.0070.02117.84
8.0.80.0100.03718.01
8.0.70.0000.03217.95
8.0.60.0000.02817.75
8.0.50.0030.02417.82
8.0.30.0100.03317.82
8.0.20.0160.03618.33
8.0.10.0030.02417.82
8.0.00.0110.04017.78
7.4.330.0030.02715.55
7.4.320.0060.01917.63
7.4.300.0030.02117.57
7.4.290.0030.02717.52
7.4.280.0040.02817.55
7.4.270.0000.03817.56
7.4.260.0030.02717.63
7.4.250.0060.02517.39
7.4.240.0030.03217.57
7.4.230.0000.03217.68
7.4.220.0040.02817.77
7.4.210.0120.04917.53
7.4.200.0030.02817.74
7.4.160.0080.04817.51
7.4.140.0140.04017.86
7.4.130.0130.03617.30
7.4.120.0130.04717.50
7.4.110.0130.03717.45
7.4.100.0100.04317.64
7.4.90.0070.04317.38
7.4.80.0070.04719.39
7.4.70.0170.05817.59
7.4.60.0030.04617.55
7.4.50.0070.03617.65
7.4.40.0130.03517.46
7.4.00.0130.03416.04
7.3.330.0030.03014.29
7.3.320.0030.02914.19
7.3.310.0060.02817.37
7.3.300.0030.03017.23
7.3.290.0030.02717.35
7.3.280.0060.04617.29
7.3.260.0100.04217.60
7.3.240.0110.05217.72
7.3.230.0100.04217.52
7.3.210.0100.04317.45
7.3.200.0060.04517.54
7.3.190.0170.04117.51
7.3.180.0060.04517.36
7.3.170.0070.06017.26
7.3.160.0060.04517.46
7.3.10.0270.03916.16
7.3.00.0310.03716.42
7.2.330.0170.05117.43
7.2.320.0130.04617.48
7.2.310.0230.05617.66
7.2.300.0100.04517.70
7.2.290.0190.06717.55
7.2.130.0260.03616.41
7.2.120.0260.04616.38
7.2.110.0250.04116.34
7.2.100.0220.03916.56
7.2.90.0300.02916.50
7.2.80.0450.04916.41
7.2.70.0300.03616.40
7.2.60.0300.03116.51
7.2.50.0280.03916.36
7.2.40.0320.05416.62
7.2.30.0340.05216.45
7.2.20.0310.03616.37
7.2.10.0370.04416.38
7.2.00.0400.04316.49
7.1.250.0250.05015.29

preferences:
36.59 ms | 401 KiB | 5 Q