3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cars=Array ( array([lnk] => Volvo, [a] => BMW), array([lnk] => Toyota, [a] => Honda), array([lnk] => Mercedes, [a] => Opel) ); print_r(array_chunk($cars,2)); ?>
based on pV0ub
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/708CM
function name:  (null)
number of ops:  36
compiled vars:  !0 = $cars
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   FETCH_CONSTANT                                   ~1      'lnk'
         1        INIT_ARRAY                                       ~2      ~1
         2        FETCH_CONSTANT                                   ~3      'Volvo'
         3        INIT_ARRAY                                       ~4      ~3, ~2
         4        FETCH_CONSTANT                                   ~5      'a'
         5        INIT_ARRAY                                       ~6      ~5
         6        FETCH_CONSTANT                                   ~7      'BMW'
         7        ADD_ARRAY_ELEMENT                                ~4      ~7, ~6
         8        INIT_ARRAY                                       ~8      ~4
   5     9        FETCH_CONSTANT                                   ~9      'lnk'
        10        INIT_ARRAY                                       ~10     ~9
        11        FETCH_CONSTANT                                   ~11     'Toyota'
        12        INIT_ARRAY                                       ~12     ~11, ~10
        13        FETCH_CONSTANT                                   ~13     'a'
        14        INIT_ARRAY                                       ~14     ~13
        15        FETCH_CONSTANT                                   ~15     'Honda'
        16        ADD_ARRAY_ELEMENT                                ~12     ~15, ~14
        17        ADD_ARRAY_ELEMENT                                ~8      ~12
   6    18        FETCH_CONSTANT                                   ~16     'lnk'
        19        INIT_ARRAY                                       ~17     ~16
        20        FETCH_CONSTANT                                   ~18     'Mercedes'
        21        INIT_ARRAY                                       ~19     ~18, ~17
        22        FETCH_CONSTANT                                   ~20     'a'
        23        INIT_ARRAY                                       ~21     ~20
        24        FETCH_CONSTANT                                   ~22     'Opel'
        25        ADD_ARRAY_ELEMENT                                ~19     ~22, ~21
        26        ADD_ARRAY_ELEMENT                                ~8      ~19
        27        ASSIGN                                                   !0, ~8
   8    28        INIT_FCALL                                               'print_r'
        29        INIT_FCALL                                               'array_chunk'
        30        SEND_VAR                                                 !0
        31        SEND_VAL                                                 2
        32        DO_ICALL                                         $24     
        33        SEND_VAR                                                 $24
        34        DO_ICALL                                                 
        35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0