3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = range(1, 11); echo implode( "\n", array_map( fn($chunk) => implode(', ', $chunk), array_chunk($data, 2) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CbIOk
function name:  (null)
number of ops:  20
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 11
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'implode'
    6     6        SEND_VAL                                                 '%0A'
    7     7        INIT_FCALL                                               'array_map'
    8     8        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          9        SEND_VAL                                                 ~3
    9    10        INIT_FCALL                                               'array_chunk'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
    7    15        DO_ICALL                                         $5      
    9    16        SEND_VAR                                                 $5
    5    17        DO_ICALL                                         $6      
    9    18        ECHO                                                     $6
   11    19      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CbIOk
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $chunk
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.03 ms | 1001 KiB | 17 Q