3v4l.org

run code in 300+ PHP versions simultaneously
<?php function key_compare_func($a, $b) { if ($a === $b) { return 0; } return ($a > $b)? 1:-1; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result = array_diff_uassoc($array1, $array2, "key_compare_func"); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hvT1m
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array1, !1 = $array2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        INIT_FCALL                                               'array_diff_uassoc'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'key_compare_func'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   13     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function key_compare_func:
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 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hvT1m
function name:  key_compare_func
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->5
    5     4    > > RETURN                                                   0
    7     5    >   IS_SMALLER                                               !1, !0
          6      > JMPZ                                                     ~3, ->9
          7    >   QM_ASSIGN                                        ~4      1
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      -1
         10    > > RETURN                                                   ~4
    8    11*     > RETURN                                                   null

End of function key_compare_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.93 ms | 1396 KiB | 17 Q