3v4l.org

run code in 500+ PHP versions simultaneously
<?php function getText() : string { return 'text'; } function printText(string $text) : void { echo $text . PHP_EOL; } printText(getText()); printText('custom text'); printText([]);

preferences:
20.25 ms | 486 KiB | 6 Q