3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __destruct(): bool { } }
Output for 8.0.0 - 8.0.2
Fatal error: Method Foo::__destruct() cannot declare a return type in /in/HNkgW on line 4
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.27, 7.4.0 - 7.4.15
Fatal error: Destructor Foo::__destruct() cannot declare a return type in /in/HNkgW on line 3
Process exited with code 255.

preferences:
43.41 ms | 457 KiB | 5 Q