3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function doFoo(): object|void; }
Output for 8.0.0 - 8.0.3, 8.3.3
Fatal error: Void can only be used as a standalone type in /in/LruJM on line 6
Process exited with code 255.
Output for 7.3.0 - 7.3.28, 7.4.0 - 7.4.16
Parse error: syntax error, unexpected '|', expecting ';' or '{' in /in/LruJM on line 6
Process exited with code 255.

preferences:
153.02 ms | 1436 KiB | 7 Q