3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="Look at this [website]{http://www.stackoverflow.com} or at this [page]{http://www.google.com}"; echo preg_replace('/\[(.*?)\]\{(.*?)\}/', "<a href='$2'>$1</a>", $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLbff
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Look+at+this+%5Bwebsite%5D%7Bhttp%3A%2F%2Fwww.stackoverflow.com%7D+or+at+this+%5Bpage%5D%7Bhttp%3A%2F%2Fwww.google.com%7D'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5C%5B%28.%2A%3F%29%5C%5D%5C%7B%28.%2A%3F%29%5C%7D%2F'
          3        SEND_VAL                                                 '%3Ca+href%3D%27%242%27%3E%241%3C%2Fa%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.34 ms | 1435 KiB | 14 Q