3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mlbCities = array( 'Carolina', 'Atlanta', 'New Orleans', 'Philadelphia', 'St. Louis', 'Washington', 'Houston', 'Tennessee', 'New England', 'NY Jets', 'Cincinnati', 'Green Bay', 'Arizona', 'Jacksonville', 'Oakland', 'Kansas City', 'Minnesota', 'Detroit', 'Tampa Bay', 'Buffalo', 'Seattle', 'San Francisco', 'Pittsburgh', 'Chicago', 'Baltimore', 'San Diego', 'Cleveland', 'Denver', 'NY Giants', 'Dallas', 'Indianapolis', 'Miami' ); $string = 'San Francisco'; foreach($mlbCities as $city) { $team = strpos($string, $city); if (!empty($team)) { echo 'Found it\r'; exit; } else { echo "Nope\r"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/X5IIL
function name:  (null)
number of ops:  19
compiled vars:  !0 = $mlbCities, !1 = $string, !2 = $city, !3 = $team
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   37     1        ASSIGN                                                   !1, 'San+Francisco'
   39     2      > FE_RESET_R                                       $6      !0, ->17
          3    > > FE_FETCH_R                                               $6, !2, ->17
   40     4    >   INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
   41     9        ISSET_ISEMPTY_CV                                 ~9      !3
         10        BOOL_NOT                                         ~10     ~9
         11      > JMPZ                                                     ~10, ->15
   42    12    >   ECHO                                                     'Found+it%5Cr'
   43    13      > EXIT                                                     
         14*       JMP                                                      ->16
   45    15    >   ECHO                                                     'Nope%0D'
   39    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $6
   48    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.8 ms | 1395 KiB | 15 Q