3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $object = (object) array( 'entity_id' => 99, ); var_dump($object->entity_id); $array = array( (object) array( 'id' => 99, ), ); $array = array( NULL, ); var_dump($array, array_flip($array)); //var_dump($array->entity_id);
based on nsMMq
Output for 4.3.2 - 5.0.5, 5.1.1 - 5.6.28, 7.0.0 - 7.1.0
int(99) Warning: array_flip(): Can only flip STRING and INTEGER values! in /in/6Mc80 on line 18 array(1) { [0]=> NULL } array(0) { }
Output for hhvm-3.10.0 - 3.12.0
int(99) Warning: Can only flip STRING and INTEGER values! in /in/6Mc80 on line 18 array(1) { [0]=> NULL } array(0) { }
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/6Mc80 on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(99) Warning: array_flip() [http://www.php.net/function.array-flip]: Can only flip STRING and INTEGER values! in /in/6Mc80 on line 18 array(1) { [0]=> NULL } array(0) { }