3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ConcreteBar { function test() { return "concrete"; } } class ApplicationBar { function test() { return "application"; } } // Alias Bar class_alias('ApplicationBar', 'Bar'); class Foo extends Bar { } $foo = new Foo; var_dump($foo->test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UKABo
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'class_alias'
          1        SEND_VAL                                                 'ApplicationBar'
          2        SEND_VAL                                                 'Bar'
          3        DO_ICALL                                                 
   25     4        DECLARE_CLASS                                            'foo', 'bar'
   30     5        NEW                                              $2      'Foo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   31     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'test'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class ConcreteBar:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UKABo
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'concrete'
    7     1*     > RETURN                                                   null

End of function test

End of class ConcreteBar.

Class ApplicationBar:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UKABo
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   'application'
   16     1*     > RETURN                                                   null

End of function test

End of class ApplicationBar.

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.07 ms | 1395 KiB | 17 Q