3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ConcreteBar { function test() { return "concrete"; } } class ApplicationBar { function test() { return "application"; } } class Foo extends Bar { } class_alias('ConcreteBar', '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/29DVp
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'foo', 'bar'
   25     1        INIT_FCALL                                               'class_alias'
          2        SEND_VAL                                                 'ConcreteBar'
          3        SEND_VAL                                                 'Bar'
          4        DO_ICALL                                                 
   28     5        NEW                                              $2      'Foo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   29     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/29DVp
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/29DVp
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:
161.12 ms | 1395 KiB | 17 Q