3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = "This is a red apple"; $words = array('red','apple'); $counts = array_intersect(str_word_count($sentence,1),$words); if(count($counts) == count($words)){ echo "Yes"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/KgkVc
function name:  (null)
number of ops:  17
compiled vars:  !0 = $sentence, !1 = $words, !2 = $counts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+a+red+apple'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_intersect'
          3        INIT_FCALL                                               'str_word_count'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    6    11        COUNT                                            ~8      !2
         12        COUNT                                            ~9      !1
         13        IS_EQUAL                                                 ~8, ~9
         14      > JMPZ                                                     ~10, ->16
    7    15    >   ECHO                                                     'Yes'
    8    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
273.84 ms | 1398 KiB | 18 Q