3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myString = "5.1,3.5,Red,4.9,3,Blue,4.7,3.2,Red,4.6,3.1,Red,5,3.6,Red"; //and so on $Arr = explode(",", $myString); $chunks = array_chunk($Arr, 3); print_r($chunks);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qD1t0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $myString, !1 = $Arr, !2 = $chunks
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '5.1%2C3.5%2CRed%2C4.9%2C3%2CBlue%2C4.7%2C3.2%2CRed%2C4.6%2C3.1%2CRed%2C5%2C3.6%2CRed'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        INIT_FCALL                                               'array_chunk'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 3
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    6    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.53 ms | 1001 KiB | 16 Q