3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orig = "asdfasdf.thumbnail.JPG"; $orig2 = "abcdef.JPG"; $goal = "asdfasdf.JPG"; $new = preg_replace("/\.thumbnail\.JPG/",".JPG",$orig2); echo $new . PHP_EOL . $goal;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cTY56
function name:  (null)
number of ops:  13
compiled vars:  !0 = $orig, !1 = $orig2, !2 = $goal, !3 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'asdfasdf.thumbnail.JPG'
    4     1        ASSIGN                                                   !1, 'abcdef.JPG'
    5     2        ASSIGN                                                   !2, 'asdfasdf.JPG'
    6     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5C.thumbnail%5C.JPG%2F'
          5        SEND_VAL                                                 '.JPG'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    8     9        CONCAT                                           ~9      !3, '%0A'
         10        CONCAT                                           ~10     ~9, !2
         11        ECHO                                                     ~10
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.8 ms | 1394 KiB | 15 Q