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/WcmdD
function name:  (null)
number of ops:  16
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                                         $9      
         11        ASSIGN                                                   !0, $9
   18    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167 ms | 1394 KiB | 19 Q