3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $prop = 'A::$prop'; public function __construct() { var_dump(get_object_vars($this)); foreach ($this as $name => $prop) { var_dump($name, $prop); } } } class B extends A { protected $prop = 'B::$prop'; } new B;
Output for git.master, git.master_jit
array(2) { ["prop"]=> string(8) "A::$prop" ["prop"]=> string(8) "B::$prop" } string(4) "prop" string(8) "A::$prop" string(4) "prop" string(8) "B::$prop"

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:
28.47 ms | 405 KiB | 5 Q