3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function baz(?Foo $foo = NULL) { } } class Bar extends Foo { public function baz(Foo $foo = NULL) { } }
Output for 8.4.1 - 8.4.21, 8.5.0 - 8.5.7
Deprecated: Bar::baz(): Implicitly marking parameter $foo as nullable is deprecated, the explicit nullable type must be used instead in /in/Shl6Y on line 13
Output for 8.1.32 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30

preferences:
62.06 ms | 854 KiB | 4 Q