3v4l.org

run code in 300+ PHP versions simultaneously
<?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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U2eEU
function name:  (null)
number of ops:  33
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>
   13    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        SEND_ARRAY                                               $9
         24        CHECK_UNDEF_ARGS                                         
         25        DO_FCALL                                      0  $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                         $11     
   11    28        ASSIGN                                                   !1, $11
   18    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.5 ms | 1396 KiB | 23 Q