3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentences = [ 'India is great country.', 'Indiana is great state.', 'I have worked in India.', 'India-based research.' ]; $search = "India"; foreach ($sentences as $sentence) { var_dump(preg_match("/\b$search\b/i", $sentence)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/vSLQo
function name:  (null)
number of ops:  17
compiled vars:  !0 = $sentences, !1 = $search, !2 = $sentence
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 'India'
   10     2      > FE_RESET_R                                       $5      !0, ->15
          3    > > FE_FETCH_R                                               $5, !2, ->15
   11     4    >   INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'preg_match'
          6        ROPE_INIT                                     3  ~7      '%2F%5Cb'
          7        ROPE_ADD                                      1  ~7      ~7, !1
          8        ROPE_END                                      2  ~6      ~7, '%5Cb%2Fi'
          9        SEND_VAL                                                 ~6
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                                 
   10    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $5
   12    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.94 ms | 1395 KiB | 17 Q