3v4l.org

run code in 300+ PHP versions simultaneously
<?php $saved = array( array( 'domain' => 'mydomain.com', 'record' => 'A', 'value' => '8.8.8.8' ), array( 'domain' => 'mydomain.com', 'record' => 'NS', 'value' => 'ns1.mydomain.com' ) ); $new = array( array( 'domain' => 'mydomain.com', 'record' => 'A', 'value' => '4.4.4.4' ), array( 'domain' => 'mydomain.com', 'record' => 'NS', 'value' => 'ns1.mydomain.com' ), array( 'domain' => 'sub.mydomain.com', 'record' => 'A', 'value' => '1.2.3.4' ), ); $combined = array_merge($saved, $new); var_dump(array_udiff_assoc($saved, $new, 'cmpr')); function cmpr($a, $b) { foreach($a as $k=>$v) { if ($b[$k] !== $v) return 1; } return 0; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N3uPP
function name:  (null)
number of ops:  16
compiled vars:  !0 = $saved, !1 = $new, !2 = $combined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   14     2        INIT_FCALL                                               'array_merge'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   16     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'array_udiff_assoc'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 'cmpr'
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
   24    15      > RETURN                                                   1

Function cmpr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/N3uPP
function name:  cmpr
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2      > FE_RESET_R                                       $4      !0, ->11
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->11
          4    >   ASSIGN                                                   !3, ~5
   20     5        FETCH_DIM_R                                      ~7      !1, !3
          6        IS_NOT_IDENTICAL                                         !2, ~7
          7      > JMPZ                                                     ~8, ->10
   21     8    >   FE_FREE                                                  $4
          9      > RETURN                                                   1
   19    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $4
   23    12      > RETURN                                                   0
   24    13*     > RETURN                                                   null

End of function cmpr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.89 ms | 1388 KiB | 19 Q