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 Giants'; foreach($mlbCities as $city) { $fl_array[] = preg_grep("/$city/", $string); } var_dump($fl_array); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/6kRGF
function name:  (null)
number of ops:  19
compiled vars:  !0 = $mlbCities, !1 = $string, !2 = $city, !3 = $fl_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   37     1        ASSIGN                                                   !1, 'San+Francisco+Giants'
   39     2      > FE_RESET_R                                       $6      !0, ->14
          3    > > FE_FETCH_R                                               $6, !2, ->14
   40     4    >   INIT_FCALL                                               'preg_grep'
          5        ROPE_INIT                                     3  ~9      '%2F'
          6        ROPE_ADD                                      1  ~9      ~9, !2
          7        ROPE_END                                      2  ~8      ~9, '%2F'
          8        SEND_VAL                                                 ~8
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $11     
         11        ASSIGN_DIM                                               !3
         12        OP_DATA                                                  $11
   39    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   43    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   44    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1386 KiB | 17 Q