3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [['host' => 'test1']], [['host' => 'test2']], ]; $array2 = [ 'test1', 'ghfhfghfg', ]; echo count( array_uintersect( $array1, $array2, fn($a, $b) => ($a[0]['host'] ?? $a) <=> ($b[0]['host'] ?? $b) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b4oWv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   14     2        INIT_FCALL                                               'array_uintersect'
   15     3        SEND_VAR                                                 !0
   16     4        SEND_VAR                                                 !1
   17     5        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   19     6        SEND_VAL                                                 ~4
   14     7        DO_ICALL                                         $5      
   19     8        COUNT                                            ~6      $5
          9        ECHO                                                     ~6
   20    10      > 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/b4oWv
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_IS                                     ~2      !0, 0
          3        FETCH_DIM_IS                                     ~3      ~2, 'host'
          4        COALESCE                                         ~4      ~3
          5        QM_ASSIGN                                        ~4      !0
   18     6        FETCH_DIM_IS                                     ~5      !1, 0
          7        FETCH_DIM_IS                                     ~6      ~5, 'host'
          8        COALESCE                                         ~7      ~6
          9        QM_ASSIGN                                        ~7      !1
         10        SPACESHIP                                        ~8      ~4, ~7
         11      > RETURN                                                   ~8
   19    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.23 ms | 1010 KiB | 14 Q