3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public function test() { $arr = [1,2,3,4,5]; array_walk($arr, array($this, 'lol')); } protected function lol() {} } $some = new Something; $some->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1bfmH
function name:  (null)
number of ops:  6
compiled vars:  !0 = $some
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Something'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Something:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1bfmH
function name:  test
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        FETCH_THIS                                       ~2      
          4        INIT_ARRAY                                       ~3      ~2
          5        ADD_ARRAY_ELEMENT                                ~3      'lol'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    8     8      > RETURN                                                   null

End of function test

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

End of function lol

End of class Something.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1395 KiB | 15 Q