3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x(): void { return; } function y(): null { return null; } $x = x(); $y = y(); var_dump($x, $y);
Output for 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
NULL NULL
Output for 8.1.34
Fatal error: Null can not be used as a standalone type in /in/kqcWp on line 5
Process exited with code 255.

preferences:
49.47 ms | 838 KiB | 4 Q