3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_diff_b($array1, $array2) { $diff = array_diff($array1, $array2); return (empty($diff)) ? TRUE : FALSE; } $a = array ('v1', 'v3', 'v4'); $b = array ('v1', 'v24', 'v3', 'v4', 'v5'); $result = array_diff_b($a, $b); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DuvsQ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'array_diff_b'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
   12     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function array_diff_b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DuvsQ
function name:  array_diff_b
number of ops:  14
compiled vars:  !0 = $array1, !1 = $array2, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'array_diff'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !2, $3
    6     7        ISSET_ISEMPTY_CV                                         !2
          8      > JMPZ                                                     ~5, ->11
          9    >   QM_ASSIGN                                        ~6      <true>
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~6      <false>
         12    > > RETURN                                                   ~6
    7    13*     > RETURN                                                   null

End of function array_diff_b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.52 ms | 1399 KiB | 18 Q