3v4l.org

run code in 500+ PHP versions simultaneously
<?php $results = array ( 0 => array ( 'id' => 1, 'name' => 'a', 'country' => 'x' ), 1 => array ( 'id' => 2, 'name' => 'b', 'country' => 'y' ) ); array_unshift($results, array_combine(array_keys($results[0]), array_keys($results[0]))); print_r($results);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h3pIH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $results
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        INIT_FCALL                                                   'array_unshift'
          2        SEND_REF                                                     !0
          3        INIT_FCALL                                                   'array_combine'
          4        INIT_FCALL                                                   'array_keys'
          5        FETCH_DIM_R                                          ~2      !0, 0
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                             $3      
          8        SEND_VAR                                                     $3
          9        INIT_FCALL                                                   'array_keys'
         10        FETCH_DIM_R                                          ~4      !0, 0
         11        SEND_VAL                                                     ~4
         12        DO_ICALL                                             $5      
         13        SEND_VAR                                                     $5
         14        DO_ICALL                                             $6      
         15        SEND_VAR                                                     $6
         16        DO_ICALL                                                     
   19    17        INIT_FCALL                                                   'print_r'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.95 ms | 2180 KiB | 17 Q