3v4l.org

run code in 500+ 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;

Abusive script

This script was stopped while abusing our resources

Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.34, 8.3.0 - 8.3.11

preferences:
28.91 ms | 1136 KiB | 7 Q