3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'Firepack_sn' => '20012205', 'Installation_Date' => '', 'Type' => 'EH', 'Capacity_m3h' => '81', 'Pressure_bar' => '3,4', 'Rpm' => '2930', 'Power_kw' => '72', ], [ 'Firepack_sn' => '20023901', 'Installation_Date' => '', 'Type' => 'DH', 'Capacity_m3h' => '195', 'Pressure_bar' => '4,2', 'Rpm' => '2000', 'Power_kw' => '72', ], ]; $array2 = [ [ 'user_id' => '40009', 'firepack_id' => '20012205', 'activated' => '1', ], [ 'user_id' => '40009', 'firepack_id' => '21020393', 'activated' => '0', ], ]; var_export( array_uintersect( $array1, $array2, fn($a, $b) => ($a['Firepack_sn'] ?? $a['firepack_id']) <=> ($b['Firepack_sn'] ?? $b['firepack_id']) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tPC9Y
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   24     1        ASSIGN                                                   !1, <array>
   37     2        INIT_FCALL                                               'var_export'
   38     3        INIT_FCALL                                               'array_uintersect'
   39     4        SEND_VAR                                                 !0
   40     5        SEND_VAR                                                 !1
   41     6        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   45     7        SEND_VAL                                                 ~4
   38     8        DO_ICALL                                         $5      
   45     9        SEND_VAR                                                 $5
   37    10        DO_ICALL                                                 
   46    11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tPC9Y
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   42     2        FETCH_DIM_IS                                     ~2      !0, 'Firepack_sn'
          3        COALESCE                                         ~3      ~2
          4        FETCH_DIM_R                                      ~4      !0, 'firepack_id'
          5        QM_ASSIGN                                        ~3      ~4
   44     6        FETCH_DIM_IS                                     ~5      !1, 'Firepack_sn'
          7        COALESCE                                         ~6      ~5
          8        FETCH_DIM_R                                      ~7      !1, 'firepack_id'
          9        QM_ASSIGN                                        ~6      ~7
         10        SPACESHIP                                        ~8      ~3, ~6
         11      > RETURN                                                   ~8
   45    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.71 ms | 1011 KiB | 15 Q