3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' [My Test URL 1|https://www.mywebsite.com/test?param=1] [My Test URL 2|https://www.mywebsite.com/test?param=2] [My Test URL 3|https://www.mywebsite.com/test?param=3] [My Test URL 4|https://www.mywebsite.com/test?param=4] '; echo preg_replace('/\[(.*?)[|](.*?)\]/', '<a href="$2">$1</a>', $html);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Depu
function name:  (null)
number of ops:  8
compiled vars:  !0 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%0A%5BMy+Test+URL+1%7Chttps%3A%2F%2Fwww.mywebsite.com%2Ftest%3Fparam%3D1%5D%0A%5BMy+Test+URL+2%7Chttps%3A%2F%2Fwww.mywebsite.com%2Ftest%3Fparam%3D2%5D%0A%5BMy+Test+URL+3%7Chttps%3A%2F%2Fwww.mywebsite.com%2Ftest%3Fparam%3D3%5D%0A%5BMy+Test+URL+4%7Chttps%3A%2F%2Fwww.mywebsite.com%2Ftest%3Fparam%3D4%5D%0A'
   10     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5C%5B%28.%2A%3F%29%5B%7C%5D%28.%2A%3F%29%5C%5D%2F'
          3        SEND_VAL                                                 '%3Ca+href%3D%22%242%22%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:
128.42 ms | 1008 KiB | 14 Q