3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "red", "red"); $array2 = array("b" => "green", "yellow", "red"); $result = array_diff($array1, $array2); print_r($result); if ($result) { echo 'not empty'; } else { echo 'empty'; } var_dump(array_values($array2));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f4iQt
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array1, !1 = $array2, !2 = $result
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_diff'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    9    10      > JMPZ                                                     !2, ->13
   10    11    >   ECHO                                                     'not+empty'
         12      > JMP                                                      ->14
   12    13    >   ECHO                                                     'empty'
   15    14    >   INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'array_values'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.61 ms | 1395 KiB | 21 Q