3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! function iterator_compose() { foreach (array_reverse(func_get_args()) as $it) { if (is_callable($it)) { $prev = $it; } } } function chunk(\Traversable $it, $chunkSize) { $chunk = []; } foreach (chunk(range(0, 128), 32) as $c) { var_export($c); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/EUook
function name:  (null)
number of ops:  16
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'chunk'
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 128
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        SEND_VAL                                                 32
          7        DO_FCALL                                      0  $2      
          8      > FE_RESET_R                                       $3      $2, ->14
          9    > > FE_FETCH_R                                               $3, !0, ->14
   21    10    >   INIT_FCALL                                               'var_export'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   20    13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $3
   22    15      > RETURN                                                   1

Function iterator_compose:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/EUook
function name:  iterator_compose
number of ops:  14
compiled vars:  !0 = $it, !1 = $prev
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'array_reverse'
          1        FUNC_GET_ARGS                                    ~2      
          2        SEND_VAL                                                 ~2
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->12
          5    > > FE_FETCH_R                                               $4, !0, ->12
    7     6    >   INIT_FCALL                                               'is_callable'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9      > JMPZ                                                     $5, ->11
    8    10    >   ASSIGN                                                   !1, !0
    6    11    > > JMP                                                      ->5
         12    >   FE_FREE                                                  $4
   11    13      > RETURN                                                   null

End of function iterator_compose

Function chunk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EUook
function name:  chunk
number of ops:  4
compiled vars:  !0 = $it, !1 = $chunkSize, !2 = $chunk
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        ASSIGN                                                   !2, <array>
   18     3      > RETURN                                                   null

End of function chunk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1407 KiB | 22 Q