3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.54 ms | 1394 KiB | 15 Q