3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a {} class b extends a {public function foo() { var_dump(get_parent_class(null)); } } $b = new b; $b->foo(); var_dump(get_parent_class('b'));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, null given in /in/Y5s9S:3 Stack trace: #0 /in/Y5s9S(3): get_parent_class(NULL) #1 /in/Y5s9S(6): b->foo() #2 {main} thrown in /in/Y5s9S on line 3
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.11 ms | 401 KiB | 8 Q