3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day_str = '1,7'; $result_str = '1,2,3,4,7'; $result = explode(',',$result_str); $days = explode(',',$day_str); if(count(array_intersect($result, $days)) == count($days)){ echo "$day_str are in $result_str"; }else{ echo "$day_str are not in $result_str"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MG5kt
function name:  (null)
number of ops:  30
compiled vars:  !0 = $day_str, !1 = $result_str, !2 = $result, !3 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1%2C7'
    3     1        ASSIGN                                                   !1, '1%2C2%2C3%2C4%2C7'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    5     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%2C'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
    7    12        INIT_FCALL                                               'array_intersect'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $10     
         16        COUNT                                            ~11     $10
         17        COUNT                                            ~12     !3
         18        IS_EQUAL                                                 ~11, ~12
         19      > JMPZ                                                     ~13, ->25
    8    20    >   ROPE_INIT                                     3  ~15     !0
         21        ROPE_ADD                                      1  ~15     ~15, '+are+in+'
         22        ROPE_END                                      2  ~14     ~15, !1
         23        ECHO                                                     ~14
         24      > JMP                                                      ->29
   10    25    >   ROPE_INIT                                     3  ~18     !0
         26        ROPE_ADD                                      1  ~18     ~18, '+are+not+in+'
         27        ROPE_END                                      2  ~17     ~18, !1
         28        ECHO                                                     ~17
   13    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.77 ms | 1400 KiB | 17 Q