3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function test() { echo 'test'; } } class_alias( 'A', 'B' ); class MyClass extends B { function test() { echo 'test under MyClass'; } } function foo (B $f) { $f->test(); } foo (new MyClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JYSns
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'class_alias'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'B'
          3        DO_ICALL                                                 
    9     4        DECLARE_CLASS                                            'myclass', 'b'
   17     5        INIT_FCALL                                               'foo'
          6        NEW                                              $1      'MyClass'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JYSns
function name:  foo
number of ops:  4
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
   15     3      > RETURN                                                   null

End of function foo

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

End of function test

End of class A.

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

End of function test

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.89 ms | 1399 KiB | 16 Q