3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test() { var_dump($this); } } // Note: Does NOT extend A class B { public function callNonStaticMethodOfA() { A::test(); } } (new B)->callNonStaticMethodOfA();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KDrQD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'B'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'callNonStaticMethodOfA'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function test

End of class A.

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

End of function callnonstaticmethodofa

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.41 ms | 1395 KiB | 15 Q