3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mass = str_split('0123'); $length = 6; foreach ($mass as $el) { $srt = null; for ($i = 1; $i <= $length; $i++) { $str += $el; if($i = $length) { $str = null; } print_r($str); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
Branch analysis from position: 10
Branch analysis from position: 14
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/1Whgp
function name:  (null)
number of ops:  23
compiled vars:  !0 = $mass, !1 = $length, !2 = $el, !3 = $srt, !4 = $i, !5 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 '0123'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    4     4        ASSIGN                                                   !1, 6
    6     5      > FE_RESET_R                                       $9      !0, ->21
          6    > > FE_FETCH_R                                               $9, !2, ->21
    7     7    >   ASSIGN                                                   !3, null
    8     8        ASSIGN                                                   !4, 1
          9      > JMP                                                      ->18
    9    10    >   ASSIGN_OP                                     1          !5, !2
   11    11        ASSIGN                                           ~13     !4, !1
         12      > JMPZ                                                     ~13, ->14
   12    13    >   ASSIGN                                                   !5, null
   15    14    >   INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !5
         16        DO_ICALL                                                 
    8    17        PRE_INC                                                  !4
         18    >   IS_SMALLER_OR_EQUAL                                      !4, !1
         19      > JMPNZ                                                    ~17, ->10
    6    20    > > JMP                                                      ->6
         21    >   FE_FREE                                                  $9
   17    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.68 ms | 1396 KiB | 17 Q