3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MergeVariableList extends ArrayObject {} $a = new MergeVariableList(); $a['test'] = 'toto'; echo $a['test']; var_dump(array_keys($a));
based on WmSQh
Output for 5.3.0 - 7.2.0
toto Warning: array_keys() expects parameter 1 to be array, object given in /in/GRFlU on line 9 NULL
Output for 5.0.0 - 5.2.17
toto Warning: array_keys(): The first argument should be an array in /in/GRFlU on line 9 NULL
Output for 4.3.2 - 4.4.9
Fatal error: Class mergevariablelist: Cannot inherit from undefined class arrayobject in /in/GRFlU on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Class mergevariablelist: Cannot inherit from undefined class arrayobject in /in/GRFlU on line 3