3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'field_bathrooms' => 'Bathrooms', 'field_bedrooms' => 'Bedrooms', 'field_king_beds' => 'King Beds', 'field_kitchen' => 'Kitchen', 'field_queen_beds' => 'Queen Beds', 'field_sleeps_max' => 'Sleeps', 'field_sofa_beds' => 'Sofa Beds', 'field_sqft' => 'Square Footage', 'field_twin_beds' => 'Twin Beds', ]; $order = [ 'Bathrooms', 'Square Footage', 'King Beds', 'Sofa Beds', 'Sleeps', 'Twin Beds', 'Queen Beds', 'Kitchen', 'Bedrooms', ]; var_export( array_flip( array_replace( array_flip($order), array_flip($array) ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ljs0J
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $order
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   27     2        INIT_FCALL                                               'var_export'
   28     3        INIT_FCALL                                               'array_flip'
   29     4        INIT_FCALL                                               'array_replace'
   30     5        INIT_FCALL                                               'array_flip'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
   31     9        INIT_FCALL                                               'array_flip'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
   29    13        DO_ICALL                                         $6      
   31    14        SEND_VAR                                                 $6
   28    15        DO_ICALL                                         $7      
   31    16        SEND_VAR                                                 $7
   27    17        DO_ICALL                                                 
   34    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.06 ms | 999 KiB | 16 Q