3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new SplPriorityQueue(); $a->insert(new stdClass, 3); $a->insert(array(), 2); $r = new ReflectionObject($a); print_r($r->getProperties());
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Array ( )
Output for hhvm-3.10.0 - 3.12.0
Array ( [0] => ReflectionProperty Object ( [info] => Array ( [name] => flags [default] => 1 [defaultValue] => 1 [access] => private [accessible] => [modifiers] => 1024 [class] => SplPriorityQueue [doc] => [type] => ) [name] => flags [class] => SplPriorityQueue [forceAccessible:ReflectionProperty:private] => ) [1] => ReflectionProperty Object ( [info] => Array ( [name] => heap [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => SplPriorityQueue [doc] => [type] => ) [name] => heap [class] => SplPriorityQueue [forceAccessible:ReflectionProperty:private] => ) )
Output for 5.0.0 - 5.2.17
Fatal error: Class 'SplPriorityQueue' not found in /in/daPBE on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splpriorityqueue in /in/daPBE on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splpriorityqueue in /in/daPBE on line 3