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'; $fl_array = preg_grep("/$string/", $mlbCities); var_dump($fl_array); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2QBVI
function name:  (null)
number of ops:  14
compiled vars:  !0 = $mlbCities, !1 = $string, !2 = $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        INIT_FCALL                                               'preg_grep'
          3        ROPE_INIT                                     3  ~6      '%2F'
          4        ROPE_ADD                                      1  ~6      ~6, !1
          5        ROPE_END                                      2  ~5      ~6, '%2F'
          6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
   40    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   41    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.78 ms | 1385 KiB | 17 Q