3v4l.org

run code in 300+ PHP versions simultaneously
<?php $deliveryCity = 'Norfolk, VA, Chicago, IL, New York, NY'; $deliveryCityArray = array_map( function($value) { return implode(',', $value); }, array_chunk( explode(',', $deliveryCity), 2 ) ); var_dump($deliveryCityArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pc3sI
function name:  (null)
number of ops:  19
compiled vars:  !0 = $deliveryCity, !1 = $deliveryCityArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Norfolk%2C+VA%2C+Chicago%2C+IL%2C+New+York%2C+NY'
    5     1        INIT_FCALL                                               'array_map'
    6     2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
    8     3        SEND_VAL                                                 ~3
    9     4        INIT_FCALL                                               'array_chunk'
   10     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%2C'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
   11    10        SEND_VAL                                                 2
    9    11        DO_ICALL                                         $5      
   11    12        SEND_VAR                                                 $5
    5    13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !1, $6
   15    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > 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/Pc3sI
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    8     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.88 ms | 1076 KiB | 18 Q