3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{{$firstName}}, {{$productName_67003}}'; if (preg_match_all('/{{\$productName_(\d{1,})}}/', $str, $matches)) { foreach ($matches[1] as $productIdKey => $productId) { $notification->message = str_replace( $matches[0][$productIdKey], '!!!!!!!!@@@@@@', $str ); } } echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 22
filename:       /in/IXX6K
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str, !1 = $matches, !2 = $productId, !3 = $productIdKey, !4 = $notification
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%7B%24firstName%7D%7D%2C++%7B%7B%24productName_67003%7D%7D'
    3     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%7B%7B%5C%24productName_%28%5Cd%7B1%2C%7D%29%7D%7D%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $6      
          6      > JMPZ                                                     $6, ->22
    4     7    >   FETCH_DIM_R                                      ~7      !1, 1
          8      > FE_RESET_R                                       $8      ~7, ->21
          9    > > FE_FETCH_R                                       ~9      $8, !2, ->21
         10    >   ASSIGN                                                   !3, ~9
    6    11        INIT_FCALL                                               'str_replace'
    7    12        FETCH_DIM_R                                      ~12     !1, 0
         13        FETCH_DIM_R                                      ~13     ~12, !3
         14        SEND_VAL                                                 ~13
    8    15        SEND_VAL                                                 '%21%21%21%21%21%21%21%21%40%40%40%40%40%40'
    9    16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $14     
    6    18        ASSIGN_OBJ                                               !4, 'message'
    9    19        OP_DATA                                                  $14
    4    20      > JMP                                                      ->9
         21    >   FE_FREE                                                  $8
   14    22    >   ECHO                                                     !0
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.14 ms | 1395 KiB | 17 Q