3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "+!This is a text with some % special chars/text and ( for a string query to match. Then !! mor&&&e and so on...chars/text."; $stringToFind = "hars/t"; preg_match('~.{10}' . preg_quote($stringToFind) . '.{10}~', $text, $match); print_r($match);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UBKIS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text, !1 = $stringToFind, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2B%21This+is+a+text+with+some+%25+special+chars%2Ftext+and+%28+for+a+string+query+to+match.+Then+%21%21+mor%26%26%26e+and+so+on...chars%2Ftext.'
    3     1        ASSIGN                                                   !1, 'hars%2Ft'
    4     2        INIT_FCALL                                               'preg_match'
          3        INIT_FCALL                                               'preg_quote'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      '%7E.%7B10%7D', $5
          7        CONCAT                                           ~7      ~6, '.%7B10%7D%7E'
          8        SEND_VAL                                                 ~7
          9        SEND_VAR                                                 !0
         10        SEND_REF                                                 !2
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.31 ms | 1011 KiB | 16 Q