3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "/var/www/cms/video/2016/02/vernon-avenue-deli-robbery--1454619366.mp4/new-york-city_14.jpg"; $pattern = "/^\/var\/www\/cms\/.*$/"; $replacement = ''; echo preg_replace($pattern, $replacement, $subject);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UuUHi
function name:  (null)
number of ops:  10
compiled vars:  !0 = $subject, !1 = $pattern, !2 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fvar%2Fwww%2Fcms%2Fvideo%2F2016%2F02%2Fvernon-avenue-deli-robbery--1454619366.mp4%2Fnew-york-city_14.jpg'
    3     1        ASSIGN                                                   !1, '%2F%5E%5C%2Fvar%5C%2Fwww%5C%2Fcms%5C%2F.%2A%24%2F'
    4     2        ASSIGN                                                   !2, ''
    5     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.79 ms | 1394 KiB | 15 Q