3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Bar extends Foo {} class Baz extends Bar {} $object = new Baz(); $tree = array(); $class = get_class($object); do { $tree[] = $class; } while ($class = get_parent_class($class)); var_dump($tree);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/iDMsR
function name:  (null)
number of ops:  17
compiled vars:  !0 = $object, !1 = $tree, !2 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        ASSIGN                                                   !1, <array>
   11     4        GET_CLASS                                        ~7      !0
          5        ASSIGN                                                   !2, ~7
   13     6    >   ASSIGN_DIM                                               !1
          7        OP_DATA                                                  !2
   15     8        INIT_FCALL                                               'get_parent_class'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $10     
         11        ASSIGN                                           ~11     !2, $10
         12      > JMPNZ                                                    ~11, ->6
   17    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]
Class Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
224.21 ms | 1394 KiB | 17 Q