3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stringToReplace = "opening-ceremony-600x450.d20140220-u162540.jpg"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = floor($removeTimestamp - 21); $example_1 = substr_replace($stringToReplace, "jpg",$removeTimestamp); echo $example_1."\n"; $stringToReplace = "marc-by-marc-jacobs-13-black-136831_3-90x90.d20140220-u071915.jpg"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = floor($removeTimestamp - 21); $example_2 = substr_replace($stringToReplace, "jpg",$removeTimestamp); echo $example_2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iq87J
function name:  (null)
number of ops:  32
compiled vars:  !0 = $stringToReplace, !1 = $removeTimestamp, !2 = $example_1, !3 = $example_2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'opening-ceremony-600x450.d20140220-u162540.jpg'
    3     1        STRLEN                                           ~5      !0
          2        ASSIGN                                                   !1, ~5
    4     3        INIT_FCALL                                               'floor'
          4        SUB                                              ~7      !1, 21
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    5     8        INIT_FCALL                                               'substr_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'jpg'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
    6    14        CONCAT                                           ~12     !2, '%0A'
         15        ECHO                                                     ~12
    8    16        ASSIGN                                                   !0, 'marc-by-marc-jacobs-13-black-136831_3-90x90.d20140220-u071915.jpg'
    9    17        STRLEN                                           ~14     !0
         18        ASSIGN                                                   !1, ~14
   10    19        INIT_FCALL                                               'floor'
         20        SUB                                              ~16     !1, 21
         21        SEND_VAL                                                 ~16
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !1, $17
   11    24        INIT_FCALL                                               'substr_replace'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 'jpg'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $19     
         29        ASSIGN                                                   !3, $19
   12    30        ECHO                                                     !3
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.17 ms | 1396 KiB | 17 Q