3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class C { private $s; public function __construct($s) { $this->s = $s; } protected function getS() { return $this->s; } } class C1 extends C { public function __get($name) { return 'wanted'.$name; } public function __construct($s1) { parent::__construct($s1); } function doStuff() { echo $this->getS(); echo $this->s; } } $c1 = new C1('foo'); $c1->doStuff();
Output for git.master, git.master_jit, rfc.property-hooks
foowanteds

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:
54.49 ms | 401 KiB | 8 Q