3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data_array = array(); $arrDataKeys = 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($arrDataKeys, $arrSaveKeys); var_dump($data_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k3YLj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data_array, !1 = $arrDataKeys, !2 = $arrSave, !3 = $arrSaveKeys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
   14     2        ASSIGN                                                   !2, <array>
   16     3        INIT_FCALL                                               'array_flip'
          4        SEND_VAR                                                 !2
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !3, $7
   17     7        INIT_FCALL                                               'array_intersect_key'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $10     
         11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  $10
   18    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:
173.33 ms | 1398 KiB | 19 Q