3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "2014-01-12-a23ert78df23456ewr91234df789dfh456hj912er.txt"; $date = substr($filename, 0, 10); // 2014-01-02 $path = str_replace("-","/",$date); // 2014/01/02 echo $path;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8f6AG
function name:  (null)
number of ops:  15
compiled vars:  !0 = $filename, !1 = $date, !2 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-01-12-a23ert78df23456ewr91234df789dfh456hj912er.txt'
    3     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 10
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    4     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '-'
          9        SEND_VAL                                                 '%2F'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
    5    13        ECHO                                                     !2
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.27 ms | 1398 KiB | 17 Q