3v4l.org

run code in 500+ PHP versions simultaneously
<?php $days = range(1,31); $i = 3; $j = 2; $str =""; for($k=0;$k<end($days);){ $str .= "<b>" . implode("</b> <b>", array_slice($days, $k,$i)) ."</b> " . implode(" ", array_slice($days, $k+$i, $j)). " "; $k=$k+$i+$j; } echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 10
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 10
Branch analysis from position: 36
Branch analysis from position: 10
filename:       /in/CpoVb
function name:  (null)
number of ops:  38
compiled vars:  !0 = $days, !1 = $i, !2 = $j, !3 = $str, !4 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     31
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !0, $5
    4     5        ASSIGN                                                       !1, 3
    5     6        ASSIGN                                                       !2, 2
    6     7        ASSIGN                                                       !3, ''
    7     8        ASSIGN                                                       !4, 0
          9      > JMP                                                          ->31
    8    10    >   INIT_FCALL                                                   'array_slice'
         11        SEND_VAR                                                     !0
         12        SEND_VAR                                                     !4
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                             $11     
         15        FRAMELESS_ICALL_2                implode             ~12     '%3C%2Fb%3E+%3Cb%3E', $11
         16        CONCAT                                               ~13     '%3Cb%3E', ~12
         17        CONCAT                                               ~14     ~13, '%3C%2Fb%3E+'
         18        INIT_FCALL                                                   'array_slice'
         19        SEND_VAR                                                     !0
         20        ADD                                                  ~15     !4, !1
         21        SEND_VAL                                                     ~15
         22        SEND_VAR                                                     !2
         23        DO_ICALL                                             $16     
         24        FRAMELESS_ICALL_2                implode             ~17     '+', $16
         25        CONCAT                                               ~18     ~14, ~17
         26        CONCAT                                               ~19     ~18, '+'
         27        ASSIGN_OP                                         8          !3, ~19
    9    28        ADD                                                  ~21     !4, !1
         29        ADD                                                  ~22     ~21, !2
         30        ASSIGN                                                       !4, ~22
    7    31    >   INIT_FCALL                                                   'end'
         32        SEND_REF                                                     !0
         33        DO_ICALL                                             $24     
         34        IS_SMALLER                                                   !4, $24
         35      > JMPNZ                                                        ~25, ->10
   11    36    >   ECHO                                                         !3
         37      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
213.97 ms | 3372 KiB | 16 Q