3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stringToReplace = "opening-ceremony-600x450.d20140220-u162540.jpg'"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = $removeTimestamp - 22; $string = substr_replace($stringToReplace, "jpg",$removeTimestamp); echo $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UgEcE
function name:  (null)
number of ops:  13
compiled vars:  !0 = $stringToReplace, !1 = $removeTimestamp, !2 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'opening-ceremony-600x450.d20140220-u162540.jpg%27'
    3     1        STRLEN                                           ~4      !0
          2        ASSIGN                                                   !1, ~4
    4     3        SUB                                              ~6      !1, 22
          4        ASSIGN                                                   !1, ~6
    5     5        INIT_FCALL                                               'substr_replace'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 'jpg'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    6    11        ECHO                                                     !2
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.69 ms | 1394 KiB | 15 Q