3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.66 ms | 1394 KiB | 15 Q