3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stringToReplace = "opening-ceremony-600x450.d20140220-u162540.jpg'"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = $removeTimestamp - 7; $string = substr_replace($stringToReplace, ".jpg", $removeTimestamp,$removeTimestamp); echo $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VRoNk
function name:  (null)
number of ops:  14
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, 7
          4        ASSIGN                                                   !1, ~6
    5     5        INIT_FCALL                                               'substr_replace'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '.jpg'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    6    12        ECHO                                                     !2
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.76 ms | 1385 KiB | 15 Q