3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Statystyka { private $stat_ope; public function getStatOpe() { return $this->stat_ope; } public function setStatOpe($stat_ope) { $this->stat_ope = $stat_ope; } } class Rownanie { private $operator; public function changeValueOperator(Statystyka $statystyka) { $this->operator++; $statystyka->setStatOpe($statystyka->getStatOpe() + 1); return $this; } public function getOperator() { return $this->operator; } } $ob = new Rownanie(); $sta = new Statystyka(); echo $ob->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $ob->changeValueOperator($sta)->getOperator(); echo $sta->getStatOpe();
Output for git.master, git.master_jit, rfc.property-hooks
1234566

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:
35.18 ms | 1603 KiB | 4 Q