3v4l.org

run code in 300+ PHP versions simultaneously
<?php $campaignIds = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17); $limit=3; $blocksCount = count($campaignIds) / $limit;echo $blocksCount.PHP_EOL; for ($i = 0; $i < $blocksCount; $i++) {echo $i.' - '. $blocksCount * $i .PHP_EOL; print_r((array_slice($campaignIds, $blocksCount * $i, $limit))); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 9
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 9
Branch analysis from position: 26
Branch analysis from position: 9
filename:       /in/gsD5I
function name:  (null)
number of ops:  27
compiled vars:  !0 = $campaignIds, !1 = $limit, !2 = $blocksCount, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 3
    5     2        COUNT                                            ~6      !0
          3        DIV                                              ~7      ~6, !1
          4        ASSIGN                                                   !2, ~7
          5        CONCAT                                           ~9      !2, '%0A'
          6        ECHO                                                     ~9
    6     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->24
          9    >   CONCAT                                           ~11     !3, '+-+'
         10        MUL                                              ~12     !2, !3
         11        CONCAT                                           ~13     ~11, ~12
         12        CONCAT                                           ~14     ~13, '%0A'
         13        ECHO                                                     ~14
    7    14        INIT_FCALL                                               'print_r'
         15        INIT_FCALL                                               'array_slice'
         16        SEND_VAR                                                 !0
         17        MUL                                              ~15     !2, !3
         18        SEND_VAL                                                 ~15
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $16     
         21        SEND_VAR                                                 $16
         22        DO_ICALL                                                 
    6    23        PRE_INC                                                  !3
         24    >   IS_SMALLER                                               !3, !2
         25      > JMPNZ                                                    ~19, ->9
    8    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.91 ms | 1395 KiB | 17 Q