3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cascade(string $s, int $gap): string { $lines = []; $words = explode(' ', $s); foreach ($words as $word) { $line = ""; for ($i = 0; $i < strlen($word); $i++) { $line .= str_repeat('_', $gap * $i) . $word[$i] . PHP_EOL; } $lines[] = trim($line); // Remove the trailing newline character } return implode(PHP_EOL, $lines); } echo cascade('The codings bug', 2);

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.5.10.0130.00616.62
8.5.00.0160.00719.83
8.4.160.0140.01023.82
8.4.150.0020.00014.05
8.4.140.0130.00917.71
8.4.130.0110.01018.89
8.4.120.0110.00824.14
8.4.110.0120.00918.90
8.4.100.0130.00917.82
8.4.90.0100.01018.78
8.4.80.0140.00719.45
8.4.70.0090.01117.80
8.4.60.0150.00519.56
8.4.50.0150.00617.50
8.4.40.0100.01017.61
8.4.30.0080.01120.53
8.4.20.0130.00719.39
8.4.10.0130.00319.54
8.3.280.0080.01218.44
8.3.270.0130.00816.61
8.3.260.0130.00616.55
8.3.250.0120.00718.78
8.3.240.0080.00917.19
8.3.230.0060.00316.63
8.3.220.0050.00417.42
8.3.210.0050.01216.75
8.3.200.0050.00816.66
8.3.190.0080.01117.24
8.3.180.0130.00517.12
8.3.170.0060.01217.08
8.3.160.0070.01118.50
8.3.150.0110.00716.90
8.3.140.0060.00318.67
8.3.130.0110.00818.54
8.3.120.0080.00820.77
8.3.110.0100.00016.61
8.3.100.0370.01137.54
8.3.90.0290.01937.54
8.3.80.0330.01137.54
8.3.70.0400.00837.54
8.3.60.0270.01737.54
8.3.50.0400.00737.54
8.3.40.0380.00737.54
8.3.30.0290.01437.54
8.3.20.0260.01937.54
8.3.10.0400.00737.54
8.3.00.0130.00937.54
8.2.290.0080.01020.29
8.2.280.0130.00518.54
8.2.270.0210.00016.60
8.2.260.0080.00016.49
8.2.250.0050.00318.46
8.2.240.0120.00416.32
8.2.230.0000.00920.94
8.2.220.0050.01037.54
8.2.210.0210.00037.54
8.2.200.0190.00037.54
8.2.190.0120.00837.54
8.2.180.0120.00737.54
8.2.170.0210.00037.54
8.2.160.0150.00637.54
8.2.150.0070.01337.54
8.2.140.0130.00737.54
8.2.130.0210.00337.54
8.2.120.0240.00337.54
8.2.110.0250.00637.54
8.2.100.0230.00937.54
8.2.90.0360.00737.54
8.2.80.0350.00937.54
8.2.70.0420.00337.54
8.2.60.0330.01337.54
8.2.50.0420.00337.54
8.2.40.0480.00037.54
8.2.30.0330.00737.54
8.2.20.0290.01637.54
8.2.10.0300.00437.54
8.2.00.0350.00037.54
8.1.330.0120.00720.21
8.1.320.0060.00216.35
8.1.310.0120.00618.00
8.1.300.0080.00020.13
8.1.290.0350.00837.54
8.1.280.0470.00637.54
8.1.270.0420.01037.54
8.1.260.0410.00737.54
8.1.250.0290.00937.54
8.1.240.0230.01237.54
8.1.230.0440.00337.54
8.1.220.0270.01137.54
8.1.210.0260.01037.54
8.1.200.0330.00337.54
8.1.190.0390.00037.54
8.1.180.0230.01237.54
8.1.170.0210.01137.54
8.1.160.0350.00637.54
8.1.150.0190.01637.54
8.1.140.0230.00537.54
8.1.130.0160.01637.54
8.1.120.0180.00437.54
8.1.110.0110.00737.54
8.1.100.0130.00637.54
8.1.90.0180.00037.54
8.1.80.0130.00537.54
8.1.70.0180.00037.54
8.1.60.0320.00937.54
8.1.50.0250.00437.54
8.1.40.0360.00637.54
8.1.30.0360.00637.54
8.1.20.0150.01237.54
8.1.10.0350.00637.54
8.1.00.0140.00737.54

preferences:
73 ms | 403 KiB | 5 Q