3v4l.org

run code in 300+ PHP versions simultaneously
<?php function handler() { } set_error_handler('handler'); class huh { public function __get($var) { $array = array(); $value = $array[$var]; $realVar = $var; if (substr($var, -1) == 'a') { } if (isset($value)) { $anotherValue = $var . 'a'; if ($value['a']) { } } } } $one = new huh(); $two = new huh(); $items = new ArrayObject(array($one, $two)); unset($items[0]); unset($items[0]->test); $items[1]->test;

preferences:
35.74 ms | 402 KiB | 5 Q