3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => null]; $b = ['a' => false]; var_dump(array_diff($a, $b)); var_dump(array_diff_assoc($a, $b)); var_dump(array_udiff_assoc($a, $b, function ($a, $b) { return $a === $b; }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YW0CH
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'array_diff'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'array_diff_assoc'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'array_udiff_assoc'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
   10    21        SEND_VAL                                                 ~8
    8    22        DO_ICALL                                         $9      
   10    23        SEND_VAR                                                 $9
    8    24        DO_ICALL                                                 
   10    25      > 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/YW0CH
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        IS_IDENTICAL                                     ~2      !0, !1
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.55 ms | 1002 KiB | 17 Q