3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str[] = "3543900000133243"; $str[] = "3543sssssxxxxxx23243"; $str[] = "1543344=-23-1--923243"; $pattern = "/\A3543(.+)3243\Z/"; foreach($str as $key=>$string) { if(preg_match($pattern,$string,$res)) { echo "found in $string: ".$res[1]." at position ".strpos($string,$res[1]); } else { echo "not found in $string"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 34
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 34
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/raqCg
function name:  (null)
number of ops:  36
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                                                  '3543900000133243'
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  '3543sssssxxxxxx23243'
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  '1543344%3D-23-1--923243'
    7     6        ASSIGN                                                   !1, '%2F%5CA3543%28.%2B%293243%5CZ%2F'
    9     7      > FE_RESET_R                                       $9      !0, ->34
          8    > > FE_FETCH_R                                       ~10     $9, !2, ->34
          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, ->30
   11    16    >   ROPE_INIT                                     3  ~14     'found+in+'
         17        ROPE_ADD                                      1  ~14     ~14, !2
         18        ROPE_END                                      2  ~13     ~14, '%3A+'
         19        FETCH_DIM_R                                      ~16     !4, 1
         20        CONCAT                                           ~17     ~13, ~16
         21        CONCAT                                           ~18     ~17, '+at+position+'
         22        INIT_FCALL                                               'strpos'
         23        SEND_VAR                                                 !2
         24        FETCH_DIM_R                                      ~19     !4, 1
         25        SEND_VAL                                                 ~19
         26        DO_ICALL                                         $20     
         27        CONCAT                                           ~21     ~18, $20
         28        ECHO                                                     ~21
         29      > JMP                                                      ->33
   14    30    >   NOP                                                      
         31        FAST_CONCAT                                      ~22     'not+found+in+', !2
         32        ECHO                                                     ~22
    9    33    > > JMP                                                      ->8
         34    >   FE_FREE                                                  $9
   16    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.9 ms | 1400 KiB | 17 Q