3v4l.org

run code in 300+ PHP versions simultaneously
<?php class P { private $my_private_prop = 'parent value'; protected $my_protected_prop = 'parent value'; } class C extends P { private $my_private_prop = 'child value'; protected $my_protected_prop = 'child value'; } echo var_dump(new P); echo var_dump(new C);
Output for git.master_jit, git.master
object(P)#1 (2) { ["my_private_prop":"P":private]=> string(12) "parent value" ["my_protected_prop":protected]=> string(12) "parent value" } object(C)#1 (3) { ["my_private_prop":"P":private]=> string(12) "parent value" ["my_protected_prop":protected]=> string(11) "child value" ["my_private_prop":"C":private]=> string(11) "child value" }

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:
25.65 ms | 406 KiB | 5 Q