3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ret[0] = 1; // player position $ret[1] = 'Tiger Woods'; // player name $ret[3] = 68; // score $ret[4] = 2; // start of second record, player #2 position $ret[5] = 'Phil Mickleson'; // player #2 name $ret[6] = 69; // player #2 score $newret = array_combine ( array('position', 'name', 'score'), call_user_func_array( 'array_map', array_merge(array(NULL),array_chunk($ret, 3)) ) ); print_r($newret);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/U2eEU
function name:  (null)
number of ops:  32
compiled vars:  !0 = $ret, !1 = $newret
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN_DIM                                               !0, 0
         1        OP_DATA                                                  1
   4     2        ASSIGN_DIM                                               !0, 1
         3        OP_DATA                                                  'Tiger+Woods'
   5     4        ASSIGN_DIM                                               !0, 3
         5        OP_DATA                                                  68
   6     6        ASSIGN_DIM                                               !0, 4
         7        OP_DATA                                                  2
   7     8        ASSIGN_DIM                                               !0, 5
         9        OP_DATA                                                  'Phil+Mickleson'
   8    10        ASSIGN_DIM                                               !0, 6
        11        OP_DATA                                                  69
  11    12        INIT_FCALL                                               'array_combine'
  12    13        SEND_VAL                                                 <array>
        14        INIT_FCALL                                               'array_map'
  15    15        INIT_FCALL                                               'array_merge'
        16        SEND_VAL                                                 <array>
        17        INIT_FCALL                                               'array_chunk'
        18        SEND_VAR                                                 !0
        19        SEND_VAL                                                 3
        20        DO_ICALL                                         $8      
        21        SEND_VAR                                                 $8
        22        DO_ICALL                                         $9      
        23        UNKNOWN                                                  $9
        24        DO_FCALL                                      0  $10     
        25        SEND_VAR                                                 $10
        26        DO_ICALL                                         $11     
        27        ASSIGN                                                   !1, $11
  18    28        INIT_FCALL                                               'print_r'
        29        SEND_VAR                                                 !1
        30        DO_ICALL                                                 
        31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0