3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Node { protected $_type; protected $_props; protected $_children; public function __construct($type, array $props = null) { $this->_type = $type; $this->_props = array(); $this->_children = array(); if (null !== $props) { $this->setProps($props); } } public function getType() { return $this->_type; } public function addChild(Euhit_Markup_Latex_Parser_Node $node) { $this->_children[] = $node; return $this; } public function getChildren() { return $this->_children; } public function setProps(array $props) { foreach ($props as $key => $value) { $this->setProp($key, $value); } return $this; } public function setProp($key, $value) { $this->_props[$key] = $value; return $this; } public function &getProp($key) { return isset($this->_props[$key]) ? $this->_props[$key] : null; } public function __set($key, $value) { $this->setProp($key, $value); } public function &__get($key) { return $this->getProp($key); } } $node = new Node(1024); $dupa = &$node->dupa; $dupa .= 'DUUPA!!!'; echo $node->dupa;
Output for git.master, git.master_jit, rfc.property-hooks
Notice: Only variable references should be returned by reference in /in/CNpdT on line 53 Notice: Only variable references should be returned by reference in /in/CNpdT on line 53

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