3v4l.org

run code in 500+ PHP versions simultaneously
<?php $courseAreas = array('ayrshire', 'fife', 'cheshire', 'lanarkshire'); $includesAyrshireAndFife = (count(array_intersect(array('ayrshire', 'fife'), $courseAreas)) >= 2) ? true : false; var_dump($includesAyrshireAndFife); $courseAreas = array('ayrshire', 'sterlingshire', 'cheshire', 'lanarkshire'); $includesAyrshireAndFife = (count(array_intersect(array('ayrshire', 'fife'), $courseAreas)) >= 2) ? true : false; var_dump($includesAyrshireAndFife);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
Branch analysis from position: 25
filename:       /in/3hKlT
function name:  (null)
number of ops:  31
compiled vars:  !0 = $courseAreas, !1 = $includesAyrshireAndFife
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'array_intersect'
          2        SEND_VAL                                                     <array>
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $3      
          5        COUNT                                                ~4      $3
          6        IS_SMALLER_OR_EQUAL                                          2, ~4
          7      > JMPZ                                                         ~5, ->10
          8    >   QM_ASSIGN                                            ~6      <true>
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~6      <false>
         11    >   ASSIGN                                                       !1, ~6
    5    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                                     
    7    15        ASSIGN                                                       !0, <array>
    8    16        INIT_FCALL                                                   'array_intersect'
         17        SEND_VAL                                                     <array>
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                             $10     
         20        COUNT                                                ~11     $10
         21        IS_SMALLER_OR_EQUAL                                          2, ~11
         22      > JMPZ                                                         ~12, ->25
         23    >   QM_ASSIGN                                            ~13     <true>
         24      > JMP                                                          ->26
         25    >   QM_ASSIGN                                            ~13     <false>
         26    >   ASSIGN                                                       !1, ~13
    9    27        INIT_FCALL                                                   'var_dump'
         28        SEND_VAR                                                     !1
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.06 ms | 2289 KiB | 15 Q