3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Example; class A { public function test(string $a) { return $a; } } class B extends A { public function test(mixed $a) { return parent::test($a); } } $b = new B(); var_dump(get_debug_type($b));
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
string(9) "Example\B"

preferences:
59.3 ms | 406 KiB | 5 Q