3v4l.org

run code in 300+ PHP versions simultaneously
<?php class One { public function first() { echo "1"; } protected function second() { echo "2"; } private function third() { echo "3"; } public function main() { $mid = [3, 4]; echo 4; array_reduce($mid, function ($key, $val) { $this->first(); $this->second(); $this->third(); }); } } $one = new One; $one->main();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IfPR5
function name:  (null)
number of ops:  6
compiled vars:  !0 = $one
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   NEW                                              $1      'One'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   36     3        INIT_METHOD_CALL                                         !0, 'main'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIfPR5%3A26%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IfPR5
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $key, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   27     2        FETCH_THIS                                       $2      
          3        INIT_METHOD_CALL                                         $2, 'first'
          4        DO_FCALL                                      0          
   28     5        FETCH_THIS                                       $4      
          6        INIT_METHOD_CALL                                         $4, 'second'
          7        DO_FCALL                                      0          
   29     8        FETCH_THIS                                       $6      
          9        INIT_METHOD_CALL                                         $6, 'third'
         10        DO_FCALL                                      0          
   30    11      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIfPR5%3A26%240

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

End of function first

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

End of function second

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

End of function third

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IfPR5
function name:  main
number of ops:  8
compiled vars:  !0 = $mid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN                                                   !0, <array>
   24     1        ECHO                                                     4
   26     2        INIT_FCALL                                               'array_reduce'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIfPR5%3A26%240'
   30     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   31     7      > RETURN                                                   null

End of function main

End of class One.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1400 KiB | 15 Q