3v4l.org

run code in 500+ PHP versions simultaneously
<?php $pattern = "/(.+\/)[^.]+\.([^.]+\.ha)$/"; $s = "/myhome/ishere/where/are.you.ha"; echo preg_replace($pattern, "$1$2", $s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EGvXK
function name:  (null)
number of ops:  6
compiled vars:  !0 = $pattern, !1 = $s
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F%28.%2B%5C%2F%29%5B%5E.%5D%2B%5C.%28%5B%5E.%5D%2B%5C.ha%29%24%2F'
    4     1        ASSIGN                                                       !1, '%2Fmyhome%2Fishere%2Fwhere%2Fare.you.ha'
    5     2        FRAMELESS_ICALL_3                preg_replace        ~4      !0, '%241%242'
          3        OP_DATA                                                      !1
          4        ECHO                                                         ~4
          5      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
207.16 ms | 1877 KiB | 13 Q