3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ public $sName; public $oReturn; function __construct($sName) { $this->sName = $sName; $this->oReturn = new stdClass; $this->oReturn->status = 200; $this->oReturn->value = "Personname"; } public function something($oData){ //Declaration $this->oReturn->value = $oData->newName; //Main //Return return $this->oReturn; } } $Person = new Person('Walter'); $data = new stdClass(); $data->newName = 'Changed Name'; var_dump($Person->something($data));
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#2 (2) { ["status"]=> int(200) ["value"]=> string(12) "Changed Name" }

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