3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stringToReplace = "opening-ceremony-600x450.d20140220-u162540.jpg'"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = float($removeTimestamp - 17); $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/RtfCb
function name:  (null)
number of ops:  16
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        INIT_FCALL_BY_NAME                                       'float'
          4        SUB                                              ~6      !1, 17
          5        SEND_VAL_EX                                              ~6
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    5     8        INIT_FCALL                                               'substr_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 '.jpg'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    6    14        ECHO                                                     !2
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.79 ms | 1394 KiB | 15 Q