3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'somenametofind|alinktoimages_icon_047_00.png|some-text'; $searched = array("some-text", "047"); foreach ($searched as $s) { if (preg_match("/(^|[^A-Za-z0-9])$s([^A-Za-z0-9]|$)/i", $string) ) { echo "found $s\n"; } }
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 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/q7KCu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $searched, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'somenametofind%7Calinktoimages_icon_047_00.png%7Csome-text'
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $5      !1, ->17
          3    > > FE_FETCH_R                                               $5, !2, ->17
    6     4    >   INIT_FCALL                                               'preg_match'
          5        ROPE_INIT                                     3  ~7      '%2F%28%5E%7C%5B%5EA-Za-z0-9%5D%29'
          6        ROPE_ADD                                      1  ~7      ~7, !2
          7        ROPE_END                                      2  ~6      ~7, '%28%5B%5EA-Za-z0-9%5D%7C%24%29%2Fi'
          8        SEND_VAL                                                 ~6
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11      > JMPZ                                                     $9, ->16
    7    12    >   ROPE_INIT                                     3  ~11     'found+'
         13        ROPE_ADD                                      1  ~11     ~11, !2
         14        ROPE_END                                      2  ~10     ~11, '%0A'
         15        ECHO                                                     ~10
    5    16    > > JMP                                                      ->3
         17    >   FE_FREE                                                  $5
    9    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.34 ms | 1010 KiB | 14 Q