3v4l.org

run code in 300+ PHP versions simultaneously
<?php $selected=array('11a_Ma1','11a_Sc2','11b_Ls1'); $already=array('11SJP','11a_Ma1','11a_Sc2'); print_r(array_diff($selected,$already)); print_r(array_diff($already,$selected)); $a1=array(1,2,3); $a2=array(1,2,3); $ad=array_diff($a1,$a2); if(isset($ad)){echo "YEAH";} if(!empty($ad)){echo "YEAH";}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 26
filename:       /in/0uYll
function name:  (null)
number of ops:  31
compiled vars:  !0 = $selected, !1 = $already, !2 = $a1, !3 = $a2, !4 = $ad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'array_diff'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        SEND_VAR                                                 $7
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'print_r'
         10        INIT_FCALL                                               'array_diff'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
    6    16        ASSIGN                                                   !2, <array>
    7    17        ASSIGN                                                   !3, <array>
    8    18        INIT_FCALL                                               'array_diff'
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !4, $13
    9    23        ISSET_ISEMPTY_CV                                         !4
         24      > JMPZ                                                     ~15, ->26
         25    >   ECHO                                                     'YEAH'
   10    26    >   ISSET_ISEMPTY_CV                                 ~16     !4
         27        BOOL_NOT                                         ~17     ~16
         28      > JMPZ                                                     ~17, ->30
         29    >   ECHO                                                     'YEAH'
         30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.2 ms | 1396 KiB | 17 Q