3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output=[]; $output[test('t1')] = test('t2'); function test($str){ echo $str,PHP_EOL; return rand(10, 100); }
Output for 5.6.40, 7.3.33, 7.4.33, 8.0.1 - 8.0.28, 8.1.0 - 8.1.17, 8.2.0 - 8.2.4
t1 t2

preferences:
47.26 ms | 406 KiB | 5 Q