3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NS { class A { function test() { echo 'test'; } } } namespace NS2 { } namespace NS3 { class_alias( 'NS\A', 'B' ); class MyClass extends \B { function test() { echo 'test under MyClass'; } } } namespace NS4 { function foo (\NS\A $f) { $f->test(); } foo (new \NS3\MyClass); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iP06k
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_NS_FCALL_BY_NAME                                    'NS3%5Cclass_alias'
          1        SEND_VAL_EX                                              'NS%5CA'
          2        SEND_VAL_EX                                              'B'
          3        DO_FCALL                                      0          
   17     4        DECLARE_CLASS                                            'ns3%5Cmyclass', 'b'
   28     5        INIT_NS_FCALL_BY_NAME                                    'NS4%5Cfoo'
          6        NEW                                              $1      'NS3%5CMyClass'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $1
          9        DO_FCALL                                      0          
   30    10      > RETURN                                                   1

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

End of function ns4%5Cfoo

Class NS\A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iP06k
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 NS\A.

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

End of function test

End of class NS3\MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.52 ms | 1399 KiB | 16 Q