3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (strpos($key, '.d201402') !== FALSE){ $stringToReplace = "marc-by-marc-jacobs-13-black-136831_3-90x90.jpg"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = floor($removeTimestamp - 21); $example_2 = substr_replace($stringToReplace, "jpg", $removeTimestamp); echo "Example 2: ".$example_2; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/tjiHs
function name:  (null)
number of ops:  23
compiled vars:  !0 = $key, !1 = $stringToReplace, !2 = $removeTimestamp, !3 = $example_2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strpos'
          1        SEND_VAR                                                 !0
          2        SEND_VAL                                                 '.d201402'
          3        DO_ICALL                                         $4      
          4        TYPE_CHECK                                  1018          $4
          5      > JMPZ                                                     ~5, ->22
    4     6    >   ASSIGN                                                   !1, 'marc-by-marc-jacobs-13-black-136831_3-90x90.jpg'
    5     7        STRLEN                                           ~7      !1
          8        ASSIGN                                                   !2, ~7
    6     9        INIT_FCALL                                               'floor'
         10        SUB                                              ~9      !2, 21
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
    7    14        INIT_FCALL                                               'substr_replace'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 'jpg'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !3, $12
    9    20        CONCAT                                           ~14     'Example+2%3A+', !3
         21        ECHO                                                     ~14
   11    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.4 ms | 1399 KiB | 19 Q