3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = array( 'one', 'two', 'three', ); $data = array( 'three' => 'someva3', 'one' => 'someval1', 'two' => 'someval2' ); $correctOrder = array_merge(array_flip($headers), $data); print_r($correctOrder); $expected = array_values($correctOrder); print_r($expected);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D8MKl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $headers, !1 = $data, !2 = $correctOrder, !3 = $expected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_merge'
          3        INIT_FCALL                                               'array_flip'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        SEND_VAR                                                 $6
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   17    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   19    13        INIT_FCALL                                               'array_values'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !3, $10
   21    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.97 ms | 1399 KiB | 21 Q