3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data_array[] = array( 'Student ID', 'First Name', 'Last Name', 'Employee Email', 'Student Email', 'Current Faculty', 'Current Student', 'Time Scanned' ); // Find out which keys we will save $arrSave = array(0, 2, 4); $arrSaveKeys = array_flip($arrSave); $data_array = array_intersect_key($data_array[0], $arrSaveKeys); var_dump($data_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9arUD
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data_array, !1 = $arrSave, !2 = $arrSaveKeys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0
    3     1        OP_DATA                                                  <array>
   13     2        ASSIGN                                                   !1, <array>
   15     3        INIT_FCALL                                               'array_flip'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   16     7        INIT_FCALL                                               'array_intersect_key'
          8        FETCH_DIM_R                                      ~7      !0, 0
          9        SEND_VAL                                                 ~7
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !0, $8
   17    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.22 ms | 1394 KiB | 19 Q