3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = "path"; $files = ["web_assortment-1601974529814.csv","web_assortment-1601926309814.csv", "web_assortment-1601847963649.csv", "web_assortment-1601761563649.csv", "web_assortment-1601675163649.csv"]; foreach ($files as $filename) { $arr[date("Y-m-d", (int)((int)substr($filename, -17)/1000))] = $path . $filename; } $sFileYesterday = $arr[date("Y-m-d", time()-86400)]; $sFileToday = $arr[date("Y-m-d", time())]; var_dump($sFileYesterday, $sFileToday, $arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/cb4Mp
function name:  (null)
number of ops:  43
compiled vars:  !0 = $path, !1 = $files, !2 = $filename, !3 = $arr, !4 = $sFileYesterday, !5 = $sFileToday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'path'
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $8      !1, ->19
          3    > > FE_FETCH_R                                               $8, !2, ->19
    7     4    >   INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y-m-d'
          6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !2
          8        SEND_VAL                                                 -17
          9        DO_ICALL                                         $9      
         10        CAST                                          4  ~10     $9
         11        DIV                                              ~11     ~10, 1000
         12        CAST                                          4  ~12     ~11
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                         $13     
         15        CONCAT                                           ~15     !0, !2
         16        ASSIGN_DIM                                               !3, $13
         17        OP_DATA                                                  ~15
    6    18      > JMP                                                      ->3
         19    >   FE_FREE                                                  $8
   10    20        INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'Y-m-d'
         22        INIT_FCALL                                               'time'
         23        DO_ICALL                                         $16     
         24        SUB                                              ~17     $16, 86400
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                         $18     
         27        FETCH_DIM_R                                      ~19     !3, $18
         28        ASSIGN                                                   !4, ~19
   11    29        INIT_FCALL                                               'date'
         30        SEND_VAL                                                 'Y-m-d'
         31        INIT_FCALL                                               'time'
         32        DO_ICALL                                         $21     
         33        SEND_VAR                                                 $21
         34        DO_ICALL                                         $22     
         35        FETCH_DIM_R                                      ~23     !3, $22
         36        ASSIGN                                                   !5, ~23
   13    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !4
         39        SEND_VAR                                                 !5
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.9 ms | 1006 KiB | 17 Q