3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayObject implements ArrayAccess { private $data; public function offsetSet($key, $value) { var_dump($key, $value); $this->data[$key] = $value; } public function offsetGet($key) { return $this->data[$key]; } public function offsetUnset($key) { unset($this->data[$key]); } public function offsetExists($key) { return isset($this->data[$key]); } } $arr = new ArrayObject; $arr[0] = 1; $arr[] = 2;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Cannot declare class ArrayObject, because the name is already in use in /in/Vm9QH on line 3
Process exited with code 255.

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.97 ms | 401 KiB | 8 Q