3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text="a,b,c,d,e,f,g,h,i,10,a,b,c,d,e,f,g,h,i,20,a,b,c,d,e,f,g,h,i,30,a,b,c,d,e,f,g,h,i,40,a,b,c,d,e,f,g,h,i,50"; $groups=preg_split('/(?:[^,]+\K,){39}/',$text); foreach($groups as $group){ echo "$group\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/AJe72
function name:  (null)
number of ops:  14
compiled vars:  !0 = $text, !1 = $groups, !2 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2C10%2Ca%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2C20%2Ca%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2C30%2Ca%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2C40%2Ca%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2C50'
    3     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5B%5E%2C%5D%2B%5CK%2C%29%7B39%7D%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6      > FE_RESET_R                                       $6      !1, ->12
          7    > > FE_FETCH_R                                               $6, !2, ->12
    5     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~7      !2, '%0A'
         10        ECHO                                                     ~7
    4    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $6
    6    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.57 ms | 1010 KiB | 14 Q