3v4l.org

run code in 500+ PHP versions simultaneously
<?php $url = "http://aaa-aaaa.com/bbbb-bbbbbbbbbb-2/it/clients/"; echo preg_replace("@(.*)\w{2}/([^/]+/)$@", "$1$2", $url);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/piPNF
function name:  (null)
number of ops:  5
compiled vars:  !0 = $url
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'http%3A%2F%2Faaa-aaaa.com%2Fbbbb-bbbbbbbbbb-2%2Fit%2Fclients%2F'
    3     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%40%28.%2A%29%5Cw%7B2%7D%2F%28%5B%5E%2F%5D%2B%2F%29%24%40', '%241%242'
          2        OP_DATA                                                      !0
          3        ECHO                                                         ~2
          4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
237.32 ms | 2048 KiB | 13 Q