3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(): void { print "test\n"; } // This currently gives an error, but you propose that it // would change to set $val to null? $val = test(); var_dump($val);
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.23, 8.4.1 - 8.4.10
test NULL

preferences:
50.94 ms | 406 KiB | 5 Q