3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "#test Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus #tristique non elit eu iaculis. Vivamus eget ultricies nisi. Vivamus hendrerit at mauris condimentum scelerisque. <a href='http://google.co.uk/#donec'>nibh</a> mauris, pulvinar et #commodo a, porta et tellus. Duis eget ante gravida, convallis augue id, blandit lectus. Mauris euismod commodo mi ut fringilla. Sed felis magna, rhoncus vitae mattis varius, sagittis a eros. Donec eget porta ipsum. <a href='#Mauris'>sed mauris ante</a>. Suspendisse potenti. Donec a #pretium #augue, eget hendrerit orci. Integer cursus scelerisque consequat."; $text = preg_replace('/(?:^|\s)#(\w+)/', ' <a href="tag/$1">$1</a>', $text); echo $text; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXqTr
function name:  (null)
number of ops:  9
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23test+Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Vivamus+%23tristique+non+elit+eu+iaculis.+Vivamus+eget+ultricies+nisi.+Vivamus+hendrerit+at+mauris+condimentum+scelerisque.+%3Ca+href%3D%27http%3A%2F%2Fgoogle.co.uk%2F%23donec%27%3Enibh%3C%2Fa%3E+mauris%2C+pulvinar+et+%23commodo+a%2C+porta+et+tellus.+Duis+eget+ante+gravida%2C+convallis+augue+id%2C+blandit+lectus.+Mauris+euismod+commodo+mi+ut+fringilla.+Sed+felis+magna%2C+rhoncus+vitae+mattis+varius%2C+sagittis+a+eros.+Donec+eget+porta+ipsum.+%3Ca+href%3D%27%23Mauris%27%3Esed+mauris+ante%3C%2Fa%3E.+Suspendisse+potenti.+Donec+a+%23pretium+%23augue%2C+eget+hendrerit+orci.+Integer+cursus+scelerisque+consequat.'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5E%7C%5Cs%29%23%28%5Cw%2B%29%2F'
          3        SEND_VAL                                                 '+%3Ca+href%3D%22tag%2F%241%22%3E%241%3C%2Fa%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    7     7        ECHO                                                     !0
    9     8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.07 ms | 1436 KiB | 14 Q