3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr1 = ['2b', 'b6', '5a']; $arr2 = ['5A']; // even for $arr2 = ['5a'] $u1 = array_uintersect($arr1, $arr2, function (string $a, string $b) { var_dump($a. ' == '. $b); return (int)($a == $b); }); print_r($u1); $u2 = array_uintersect($arr2, $arr1, function (string $a, string $b) { var_dump($a. ' == '. $b); return (int)($a == $b); }); print_r($u2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3gVeB
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $u1, !3 = $u2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'array_uintersect'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
    9     6        SEND_VAL                                                     ~6
    6     7        DO_ICALL                                             $7      
          8        ASSIGN                                                       !2, $7
   11     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                                     
   13    12        INIT_FCALL                                                   'array_uintersect'
         13        SEND_VAR                                                     !1
         14        SEND_VAR                                                     !0
         15        DECLARE_LAMBDA_FUNCTION                              ~10     [1]
   16    16        SEND_VAL                                                     ~10
   13    17        DO_ICALL                                             $11     
         18        ASSIGN                                                       !3, $11
   18    19        INIT_FCALL                                                   'print_r'
         20        SEND_VAR                                                     !3
         21        DO_ICALL                                                     
         22      > 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/3gVeB
function name:  {closure:/in/3gVeB:6}
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        INIT_FCALL                                                   'var_dump'
          3        CONCAT                                               ~2      !0, '+%3D%3D+'
          4        CONCAT                                               ~3      ~2, !1
          5        SEND_VAL                                                     ~3
          6        DO_ICALL                                                     
    8     7        IS_EQUAL                                             ~5      !0, !1
          8        CAST                                              4  ~6      ~5
          9      > RETURN                                                       ~6
    9    10*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3gVeB
function name:  {closure:/in/3gVeB:13}
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   14     2        INIT_FCALL                                                   'var_dump'
          3        CONCAT                                               ~2      !0, '+%3D%3D+'
          4        CONCAT                                               ~3      ~2, !1
          5        SEND_VAL                                                     ~3
          6        DO_ICALL                                                     
   15     7        IS_EQUAL                                             ~5      !0, !1
          8        CAST                                              4  ~6      ~5
          9      > RETURN                                                       ~6
   16    10*     > RETURN                                                       null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
124.62 ms | 494 KiB | 12 Q