3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(-1); class A { function foo() { echo get_class($this); } } class B { function bar() { A::foo(); } } $b = new B; $b->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gabo
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     -1
          2        DO_ICALL                                                     
   15     3        NEW                                                  $2      'B'
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $2
   16     6        INIT_METHOD_CALL                                             !0, 'bar'
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

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

End of function foo

End of class A.

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

End of function bar

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.99 ms | 3364 KiB | 14 Q