3v4l.org

run code in 300+ PHP versions simultaneously
<?php function c(array $c){ echo "Call to c\n"; return count($c); } $n = range(1,20); for($i=0; $i < $count=c($n); $i++){ echo $n[$i]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
Branch analysis from position: 7
filename:       /in/2nEav
function name:  (null)
number of ops:  17
compiled vars:  !0 = $n, !1 = $i, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 20
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
   11     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->10
   12     7    >   FETCH_DIM_R                                      ~6      !0, !1
          8        ECHO                                                     ~6
   11     9        PRE_INC                                                  !1
         10    >   INIT_FCALL                                               'c'
         11        SEND_VAR                                                 !0
         12        DO_FCALL                                      0  $8      
         13        ASSIGN                                           ~9      !2, $8
         14        IS_SMALLER                                               !1, ~9
         15      > JMPNZ                                                    ~10, ->7
   13    16    > > RETURN                                                   1

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2nEav
function name:  c
number of ops:  5
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'Call+to+c%0A'
    5     2        COUNT                                            ~1      !0
          3      > RETURN                                                   ~1
    6     4*     > RETURN                                                   null

End of function c

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.12 ms | 1398 KiB | 16 Q