3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MproObject implements IteratorAggregate, ArrayAccess, Serializable, Countable { /** * Returns whether the requested key exists * * @param mixed $key * @return bool */ public function __isset($key) { } /** * Sets the value at the specified key to value * * @param mixed $key * @param mixed $value * @return void */ public function __set($key, $value) { } /** * Unsets the value at the specified key * * @param mixed $key * @return void */ public function __unset($key) { } /** * Returns the value at the specified key by reference * * @param mixed $key * @return mixed */ public function &__get($key) { } /** * Appends the value * * @param mixed $value * @return void */ public function append($value) { } /** * Sort the entries by value * * @return void */ public function asort() { } /** * Get the number of public properties in the ArrayObject * * @return int */ public function count() { } /** * Exchange the array for another one. * * @param array|ArrayObject $data * @return array */ public function exchangeArray($data) { } /** * Creates a copy of the ArrayObject. * * @return array */ public function getArrayCopy() { } /** * Gets the behavior flags. * * @return int */ public function getFlags() { } /** * Create a new iterator from an ArrayObject instance * * @return \Iterator */ public function getIterator() { } /** * Gets the iterator classname for the ArrayObject. * * @return string */ public function getIteratorClass() { } /** * Sort the entries by key * * @return void */ public function ksort() { } /** * Sort an array using a case insensitive "natural order" algorithm * * @return void */ public function natcasesort() { } /** * Sort entries using a "natural order" algorithm * * @return void */ public function natsort() { } /** * Returns whether the requested key exists * * @param mixed $key * @return bool */ public function offsetExists($key) { } /** * Returns the value at the specified key * * @param mixed $key * @return mixed */ public function &offsetGet($key) { } /** * Sets the value at the specified key to value * * @param mixed $key * @param mixed $value * @return void */ public function offsetSet($key, $value) { } /** * Unsets the value at the specified key * * @param mixed $key * @return void */ public function offsetUnset($key) { } /** * Serialize an ArrayObject * * @return string */ public function serialize() { } /** * Sets the behavior flags * * @param int $flags * @return void */ public function setFlags($flags) { } /** * Sets the iterator classname for the ArrayObject * * @param string $class * @return void */ public function setIteratorClass($class) { } /** * Sort the entries with a user-defined comparison function and maintain key association * * @param callable $function * @return void */ public function uasort($function) { } /** * Sort the entries by keys using a user-defined comparison function * * @param callable $function * @return void */ public function uksort($function) { } /** * Unserialize an ArrayObject * * @param string $data * @return void */ public function unserialize($data) { } }
based on i0m69
Output for 5.3.4 - 7.2.0
Output for 5.1.0 - 5.3.3
Fatal error: Declaration of MproObject::offsetGet() must be compatible with that of ArrayAccess::offsetGet() in /in/fHRQn on line 3
Process exited with code 255.
Output for 5.0.5
Fatal error: Interface 'Serializable' not found in /in/fHRQn on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class 'Serializable' not found in /in/fHRQn on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/fHRQn on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting '{' in /in/fHRQn on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'{'' in /in/fHRQn on line 3
Process exited with code 255.