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 = array(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/OTNoa
function name:  (null)
number of ops:  6
compiled vars:  !0 = $one
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   NEW                                              $1      'One'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   37     3        INIT_METHOD_CALL                                         !0, 'main'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FOTNoa%3A27%240

Class One:
Function first:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OTNoa
function name:  first
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     '1'
    9     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/OTNoa
function name:  second
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     '2'
   14     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/OTNoa
function name:  third
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ECHO                                                     '3'
   19     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/OTNoa
function name:  main
number of ops:  8
compiled vars:  !0 = $mid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ASSIGN                                                   !0, <array>
   25     1        ECHO                                                     4
   27     2        INIT_FCALL                                               'array_reduce'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOTNoa%3A27%240'
   31     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   32     7      > RETURN                                                   null

End of function main

End of class One.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.02 ms | 1400 KiB | 15 Q