3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shortfn = fn($message) => (function($message){ $multi = 'I now have'; return $multi . ' ' . $message; })($message); echo $shortfn('multiple lines!');
Output for 8.1.23 - 8.1.27, 8.2.10 - 8.2.16, 8.3.0 - 8.3.3
I now have multiple lines!

preferences:
57.31 ms | 402 KiB | 21 Q