3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Add { public $left; public $right; public function construct($left = 0, $right = 0) { $this->left = $left; $this->right = $right; } public function doMath() { return $this->left + $this->right; } } $adder = new Add; $adder->left = 1; $adder->right = 2; echo $adder->doMath(); // 3 $adder->left = 3; echo $adder->doMath(); // 5
Output for git.master, git.master_jit, rfc.property-hooks
35

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