3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Service, Service, Service, 8 mars, 2017, 22 mars, 2017, 5 april, 2017, 08:00, 08:00, 08:00"; $rows = 3; var_export( array_map( null, ...array_chunk( preg_split('/(?:[A-Z][a-z]+|\d+)\K, /', $string), $rows ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YT6XN
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $rows
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Service%2C+Service%2C+Service%2C+8+mars%2C+2017%2C+22+mars%2C+2017%2C+5+april%2C+2017%2C+08%3A00%2C+08%3A00%2C+08%3A00'
    5     1        ASSIGN                                                   !1, 3
    7     2        INIT_FCALL                                               'var_export'
    8     3        INIT_FCALL                                               'array_map'
    9     4        SEND_VAL                                                 null
   10     5        INIT_FCALL                                               'array_chunk'
   11     6        INIT_FCALL                                               'preg_split'
          7        SEND_VAL                                                 '%2F%28%3F%3A%5BA-Z%5D%5Ba-z%5D%2B%7C%5Cd%2B%29%5CK%2C+%2F'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
   12    11        SEND_VAR                                                 !1
   10    12        DO_ICALL                                         $5      
   12    13        SEND_UNPACK                                              $5
         14        CHECK_UNDEF_ARGS                                         
    8    15        DO_ICALL                                         $6      
   12    16        SEND_VAR                                                 $6
    7    17        DO_ICALL                                                 
   15    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.72 ms | 1000 KiB | 17 Q