3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compare($a, $b) { echo("$a : $b\n"); return strcmp($a, $b); } $a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); $b = array('v' => 1, 'w' => 2, 'x' => 3, 'y' => 4, 'z' => 5); var_dump(array_diff_uassoc($a, $b, 'compare')); $a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); $b = array('d' => 1, 'e' => 2, 'f' => 3, 'g' => 4, 'h' => 5); var_dump(array_diff_uassoc($a, $b, 'compare')); $a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); $b = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); var_dump(array_diff_uassoc($a, $b, 'compare')); $a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); $b = array('e' => 5, 'd' => 4, 'c' => 3, 'b' => 2, 'a' => 1); var_dump(array_diff_uassoc($a, $b, 'compare'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DKgms
function name:  (null)
number of ops:  41
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'array_diff_uassoc'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 'compare'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   14    10        ASSIGN                                                   !0, <array>
   15    11        ASSIGN                                                   !1, <array>
   16    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'array_diff_uassoc'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 'compare'
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
   19    20        ASSIGN                                                   !0, <array>
   20    21        ASSIGN                                                   !1, <array>
   21    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'array_diff_uassoc'
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !1
         26        SEND_VAL                                                 'compare'
         27        DO_ICALL                                         $12     
         28        SEND_VAR                                                 $12
         29        DO_ICALL                                                 
   23    30        ASSIGN                                                   !0, <array>
   24    31        ASSIGN                                                   !1, <array>
   25    32        INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'array_diff_uassoc'
         34        SEND_VAR                                                 !0
         35        SEND_VAR                                                 !1
         36        SEND_VAL                                                 'compare'
         37        DO_ICALL                                         $16     
         38        SEND_VAR                                                 $16
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Function compare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DKgms
function name:  compare
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ROPE_INIT                                     4  ~3      !0
          3        ROPE_ADD                                      1  ~3      ~3, '+%3A+'
          4        ROPE_ADD                                      2  ~3      ~3, !1
          5        ROPE_END                                      3  ~2      ~3, '%0A'
          6        ECHO                                                     ~2
    6     7        INIT_FCALL                                               'strcmp'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11      > RETURN                                                   $5
    7    12*     > RETURN                                                   null

End of function compare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.56 ms | 1005 KiB | 16 Q