3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => '123', 'b' => '321', 'c' => ['asdf' => 'asdf']]; $b = ['a' => '123', 'b' => '123', 'c' => ['asdf' => 'asdf123']]; $r = array_udiff_assoc($a, $b, function($old, $new) { if ($old === $new) { return 0; } return (count($old) > $new ? $old : $new); }); var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pvVLt
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_udiff_assoc'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpvVLt%3A5%240'
   10     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
    5     8        ASSIGN                                                   !2, $6
   11     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpvVLt%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pvVLt
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $old, !1 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->5
    7     4    > > RETURN                                                   0
    9     5    >   COUNT                                            ~3      !0
          6        IS_SMALLER                                               !1, ~3
          7      > JMPZ                                                     ~4, ->10
          8    >   QM_ASSIGN                                        ~5      !0
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~5      !1
         11    > > RETURN                                                   ~5
   10    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpvVLt%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.05 ms | 1396 KiB | 17 Q