3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed = array('outbound_status_id', 'billing_status_id', 'date_released'); print_r(array_flip($allowed)); $cleanValues = array('gross'=>1, 'tare'=>2, 'outbound_status_id'=>3, 'driver_name'=>'bob', 'quantity'=>'awesome'); print_r(array_intersect($cleanValues, array_flip($allowed))); print_r(array_intersect_assoc($cleanValues, array_flip($allowed))); print_r(array_diff($cleanValues, array_flip($allowed)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ItZr0
function name:  (null)
number of ops:  39
compiled vars:  !0 = $allowed, !1 = $cleanValues
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'array_flip'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                                 
    5     7        ASSIGN                                                   !1, <array>
    6     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !1
         11        INIT_FCALL                                               'array_flip'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'print_r'
         19        INIT_FCALL                                               'array_intersect_assoc'
         20        SEND_VAR                                                 !1
         21        INIT_FCALL                                               'array_flip'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
    8    28        INIT_FCALL                                               'print_r'
         29        INIT_FCALL                                               'array_diff'
         30        SEND_VAR                                                 !1
         31        INIT_FCALL                                               'array_flip'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $12     
         34        SEND_VAR                                                 $12
         35        DO_ICALL                                         $13     
         36        SEND_VAR                                                 $13
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.8 ms | 1396 KiB | 23 Q