3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newFullPath = preg_replace("//([a-z0-9_\-]+)/$/", 'first', '/test/rerre/last/'); echo $newFullPath;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uC8Ul
function name:  (null)
number of ops:  8
compiled vars:  !0 = $newFullPath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%2F%2F%28%5Ba-z0-9_%5C-%5D%2B%29%2F%24%2F'
          2        SEND_VAL                                                 'first'
          3        SEND_VAL                                                 '%2Ftest%2Frerre%2Flast%2F'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    4     6        ECHO                                                     !0
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.9 ms | 1394 KiB | 15 Q