3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '</p><p><a rel="nofollow" class="external text" href="http://10.20.0.30:1234/index.php/this_is_an_example.html">How_to_sample.</a>'; $pattern = '~(?:\G|\Qhttp://10.20.0.30:1234/index.php\E[^_]+)\K_([^_.]*)~'; echo preg_replace($pattern, " $1", $input);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BXEgW
function name:  (null)
number of ops:  9
compiled vars:  !0 = $input, !1 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%2Fp%3E%3Cp%3E%3Ca+rel%3D%22nofollow%22+class%3D%22external+text%22+href%3D%22http%3A%2F%2F10.20.0.30%3A1234%2Findex.php%2Fthis_is_an_example.html%22%3EHow_to_sample.%3C%2Fa%3E'
    4     1        ASSIGN                                                   !1, '%7E%28%3F%3A%5CG%7C%5CQhttp%3A%2F%2F10.20.0.30%3A1234%2Findex.php%5CE%5B%5E_%5D%2B%29%5CK_%28%5B%5E_.%5D%2A%29%7E'
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 '+%241'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
257.5 ms | 1000 KiB | 14 Q