3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "**link(http://google.com)*{Google}**"; preg_match("/(?<=\\*\\*link)\\((.*)\\)/", $str, $match1); preg_match('/(?<=\*\*link)\((.*)\)/', $str, $match2); echo "{$match1[1]}\n{$match2[1]}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e6P32
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str, !1 = $match1, !2 = $match2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2A%2Alink%28http%3A%2F%2Fgoogle.com%29%2A%7BGoogle%7D%2A%2A'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28%3F%3C%3D%5C%2A%5C%2Alink%29%5C%28%28.%2A%29%5C%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%28%3F%3C%3D%5C%2A%5C%2Alink%29%5C%28%28.%2A%29%5C%29%2F'
          8        SEND_VAR                                                 !0
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
    5    11        FETCH_DIM_R                                      ~6      !1, 1
         12        ROPE_INIT                                     4  ~9      ~6
         13        ROPE_ADD                                      1  ~9      ~9, '%0A'
         14        FETCH_DIM_R                                      ~7      !2, 1
         15        ROPE_ADD                                      2  ~9      ~9, ~7
         16        ROPE_END                                      3  ~8      ~9, '%0A'
         17        ECHO                                                     ~8
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.58 ms | 997 KiB | 14 Q