3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed = array('outbound_status_id', 'billing_status_id', 'date_released'); $cleanValues = array('gross'=>1, 'tare'=>2, 'outbound_status_id'=>3); 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/PJ1Y9
function name:  (null)
number of ops:  33
compiled vars:  !0 = $allowed, !1 = $cleanValues
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'array_intersect'
          4        SEND_VAR                                                 !1
          5        INIT_FCALL                                               'array_flip'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'array_intersect_assoc'
         14        SEND_VAR                                                 !1
         15        INIT_FCALL                                               'array_flip'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
    7    22        INIT_FCALL                                               'print_r'
         23        INIT_FCALL                                               'array_diff'
         24        SEND_VAR                                                 !1
         25        INIT_FCALL                                               'array_flip'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $10     
         28        SEND_VAR                                                 $10
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.44 ms | 1396 KiB | 23 Q