3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str[] = "01C8000100023543900000133243"; $str[] = "01C8000100023543sssssxxxxxx23243"; $str[] = "1543344=-23-1--923243"; $pattern = "/3543(.+)3243/"; foreach($str as $key=>$string) { if(preg_match($pattern,$string,$res)) { echo $res[0]; echo "found in $string: ".$res[1]." starts at position ".strpos($string,$res[1])."\r\n"; } else { echo "not found in $string"."\r\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 38
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 38
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 33
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/ErI5n
function name:  (null)
number of ops:  40
compiled vars:  !0 = $str, !1 = $pattern, !2 = $string, !3 = $key, !4 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  '01C8000100023543900000133243'
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  '01C8000100023543sssssxxxxxx23243'
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  '1543344%3D-23-1--923243'
    7     6        ASSIGN                                                   !1, '%2F3543%28.%2B%293243%2F'
    9     7      > FE_RESET_R                                       $9      !0, ->38
          8    > > FE_FETCH_R                                       ~10     $9, !2, ->38
          9    >   ASSIGN                                                   !3, ~10
   10    10        INIT_FCALL                                               'preg_match'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        SEND_REF                                                 !4
         14        DO_ICALL                                         $12     
         15      > JMPZ                                                     $12, ->33
   11    16    >   FETCH_DIM_R                                      ~13     !4, 0
         17        ECHO                                                     ~13
   12    18        ROPE_INIT                                     3  ~15     'found+in+'
         19        ROPE_ADD                                      1  ~15     ~15, !2
         20        ROPE_END                                      2  ~14     ~15, '%3A+'
         21        FETCH_DIM_R                                      ~17     !4, 1
         22        CONCAT                                           ~18     ~14, ~17
         23        CONCAT                                           ~19     ~18, '+starts+at+position+'
         24        INIT_FCALL                                               'strpos'
         25        SEND_VAR                                                 !2
         26        FETCH_DIM_R                                      ~20     !4, 1
         27        SEND_VAL                                                 ~20
         28        DO_ICALL                                         $21     
         29        CONCAT                                           ~22     ~19, $21
         30        CONCAT                                           ~23     ~22, '%0D%0A'
         31        ECHO                                                     ~23
         32      > JMP                                                      ->37
   15    33    >   NOP                                                      
         34        FAST_CONCAT                                      ~24     'not+found+in+', !2
         35        CONCAT                                           ~25     ~24, '%0D%0A'
         36        ECHO                                                     ~25
    9    37    > > JMP                                                      ->8
         38    >   FE_FREE                                                  $9
   17    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.61 ms | 1400 KiB | 17 Q