3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Amount { private $_list = array(); protected $_number; public function __construct($number) { $this->_number = $number; } public function add(Amount $a) { array_push($this->_list, $this->_number); unset($this->_number); array_push($this->_list, $a->_number); } } $x = new Amount(2); $y = new Amount(3); var_dump($x->add($y));
Output for git.master, git.master_jit, rfc.property-hooks
NULL

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