3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $e = new SplMaxHeap(); die(new ReflectionObject($e)); $e->push(1); foreach ($e as $t) { echo $t.'.'; }
Output for 7.0.0 - 7.1.0
Object of class [ <internal:SPL> <iterateable> class SplMaxHeap extends SplHeap implements Countable, Traversable, Iterator ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Dynamic properties [0] { } - Methods [13] { Method [ <internal:SPL, overwrites SplHeap, prototype SplHeap> protected method compare ] { - Parameters [2] { Parameter #0 [ <required> $a ] Parameter #1 [ <required> $b ] } } Method [ <internal:SPL, inherits SplHeap> public method extract ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method insert ] { - Parameters [1] { Parameter #0 [ <required> $value ] } } Method [ <internal:SPL, inherits SplHeap> public method top ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Countable> public method count ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method isEmpty ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method rewind ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method current ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method key ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method next ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method valid ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method recoverFromCorruption ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method isCorrupted ] { - Parameters [0] { } } } }
Output for hhvm-3.10.0 - 3.12.0
Object of class [ <internal:> <iterable> class SplMaxHeap extends SplHeap implements HH\Iterator, Countable, HH\Traversable, Iterator, Traversable ] { - Constants [0] { } - Static properties [0] { } - Static methods [3] { Method [ <internal, inherits SplHeap> static private method leftChildIndex ] { - Parameters [1] { Parameter #0 [ <required> $rootIndex ] } } Method [ <internal, inherits SplHeap> static private method rightChildIndex ] { - Parameters [1] { Parameter #0 [ <required> $rootIndex ] } } Method [ <internal, inherits SplHeap> static private method parentIndex ] { - Parameters [1] { Parameter #0 [ <required> $childIndex ] } } } - Properties [0] { } - Methods [20] { Method [ <internal, overrides SplHeap> protected method compare ] { - Parameters [2] { Parameter #0 [ <required> $value1 ] Parameter #1 [ <required> $value2 ] } } Method [ <internal, inherits SplHeap, ctor> public method __construct ] { } Method [ <internal, inherits SplHeap> public method extract ] { } Method [ <internal, inherits SplHeap> public method insert ] { - Parameters [1] { Parameter #0 [ <required> $value ] } } Method [ <internal, inherits SplHeap> public method isEmpty ] { } Method [ <internal, inherits SplHeap> public method recoverFromCorruption ] { } Method [ <internal, inherits SplHeap> public method count ] { } Method [ <internal, inherits SplHeap> public method current ] { } Method [ <internal, inherits SplHeap> public method key ] { } Method [ <internal, inherits SplHeap> public method next ] { } Method [ <internal, inherits SplHeap> public method rewind ] { } Method [ <internal, inherits SplHeap> public method top ] { } Method [ <internal, inherits SplHeap> public method valid ] { } Method [ <internal, inherits SplHeap> private method heapifyUp ] { - Parameters [1] { Parameter #0 [ <required> $index ] } } Method [ <internal, inherits SplHeap> private method heapifyDown ] { - Parameters [1] { Parameter #0 [ <required> $index ] } } Method [ <internal, inherits SplHeap> private method getHighestChildIndex ] { - Parameters [1] { Parameter #0 [ <required> $index ] } } Method [ <internal, inherits SplHeap> private method swapElements ] { - Parameters [2] { Parameter #0 [ <required> $firstIndex ] Parameter #1 [ <required> $secondIndex ] } } Method [ <internal, inherits SplHeap> private method lowestFreeIndex ] { } Method [ <internal, inherits SplHeap> private method highestUsedIndex ] { } Method [ <internal, inherits SplHeap> private method checkNotCorrupted ] { } } }
Output for 5.3.1 - 5.6.28
Object of class [ <internal:SPL> <iterateable> class SplMaxHeap extends SplHeap implements Countable, Traversable, Iterator ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Dynamic properties [0] { } - Methods [12] { Method [ <internal:SPL, overwrites SplHeap, prototype SplHeap> protected method compare ] { - Parameters [2] { Parameter #0 [ <required> $a ] Parameter #1 [ <required> $b ] } } Method [ <internal:SPL, inherits SplHeap> public method extract ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method insert ] { - Parameters [1] { Parameter #0 [ <required> $value ] } } Method [ <internal:SPL, inherits SplHeap> public method top ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Countable> public method count ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method isEmpty ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method rewind ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method current ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method key ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method next ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method valid ] { - Parameters [0] { } } Method [ <internal:SPL, inherits SplHeap> public method recoverFromCorruption ] { - Parameters [0] { } } } }
Output for 5.3.0
Object of class [ <internal:SPL> <iterateable> class SplMaxHeap extends SplHeap implements Countable, Traversable, Iterator ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Dynamic properties [0] { } - Methods [12] { Method [ <internal:SPL, overwrites SplHeap, prototype SplHeap> protected method compare ] { - Parameters [2] { Parameter #0 [ <required> $a ] Parameter #1 [ <required> $b ] } } Method [ <internal:SPL, inherits SplHeap> public method extract ] { } Method [ <internal:SPL, inherits SplHeap> public method insert ] { - Parameters [1] { Parameter #0 [ <required> $value ] } } Method [ <internal:SPL, inherits SplHeap> public method top ] { } Method [ <internal:SPL, inherits SplHeap, prototype Countable> public method count ] { } Method [ <internal:SPL, inherits SplHeap> public method isEmpty ] { } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method rewind ] { } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method current ] { } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method key ] { } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method next ] { } Method [ <internal:SPL, inherits SplHeap, prototype Iterator> public method valid ] { } Method [ <internal:SPL, inherits SplHeap> public method recoverFromCorruption ] { } } }
Output for 5.0.0 - 5.2.17
Fatal error: Class 'SplMaxHeap' not found in /in/trceh on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splmaxheap in /in/trceh on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splmaxheap in /in/trceh on line 3