3v4l.org

run code in 200+ PHP versions simultaneously
<?php $func = function() { echo "Hello World\n"; }; $func(); (function() { echo "Hello World\n"; })();
based on TTXYr
Output for 7.1.25 - 7.4.0rc2
Hello World Hello World