3v4l.org

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

End of function foo

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

End of function bar

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.21 ms | 3081 KiB | 15 Q