3v4l.org

run code in 300+ PHP versions simultaneously
<?php class me { public $arm; public $leg; public function __construct() { $this->arm = 'beautiful'; $this->leg = 'pretty'; } public function setLeg($l) { $this->leg = $l; } public function getLeg() { return $this->leg; } } class myBio extends me { public $bio; public function __construc() { $this->bio = $this->getLeg(); } public function newLeg() { var_dump($this->bio); } public function tryLeg() { $this->leg = $this->getLeg(); print $this->leg; } } $mB = new myBio(); $mB->newLeg(); $mB->tryLeg();
Output for git.master, git.master_jit, rfc.property-hooks
NULL pretty

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