3v4l.org

run code in 300+ PHP versions simultaneously
<?php $beforeDay = time() - (60*60*24); $i = 0; $day = 0; foreach (new DirectoryIterator('../files/') as $fileInfo) { if($fileInfo->isFile() && filemtime($fileInfo->getPathName()) > $beforeDay) { $day++; } $i++; } $now = new DateTime("2014-04-07 15:30:00"); var_dump($now->diff(DateTime())); echo "<pre>total: " . $i . "\n24h: " . $day."</pre>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 25
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 23
Branch analysis from position: 21
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/59Xmc
function name:  (null)
number of ops:  44
compiled vars:  !0 = $beforeDay, !1 = $i, !2 = $day, !3 = $fileInfo, !4 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $5      
          2        SUB                                              ~6      $5, 86400
          3        ASSIGN                                                   !0, ~6
    4     4        ASSIGN                                                   !1, 0
    5     5        ASSIGN                                                   !2, 0
    6     6        NEW                                              $10     'DirectoryIterator'
          7        SEND_VAL_EX                                              '..%2Ffiles%2F'
          8        DO_FCALL                                      0          
          9      > FE_RESET_R                                       $12     $10, ->25
         10    > > FE_FETCH_R                                               $12, !3, ->25
    7    11    >   INIT_METHOD_CALL                                         !3, 'isFile'
         12        DO_FCALL                                      0  $13     
         13      > JMPZ_EX                                          ~14     $13, ->21
         14    >   INIT_FCALL                                               'filemtime'
         15        INIT_METHOD_CALL                                         !3, 'getPathName'
         16        DO_FCALL                                      0  $15     
         17        SEND_VAR                                                 $15
         18        DO_ICALL                                         $16     
         19        IS_SMALLER                                       ~17     !0, $16
         20        BOOL                                             ~14     ~17
         21    > > JMPZ                                                     ~14, ->23
    8    22    >   PRE_INC                                                  !2
   10    23    >   PRE_INC                                                  !1
    6    24      > JMP                                                      ->10
         25    >   FE_FREE                                                  $12
   12    26        NEW                                              $20     'DateTime'
         27        SEND_VAL_EX                                              '2014-04-07+15%3A30%3A00'
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !4, $20
   13    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !4, 'diff'
         32        INIT_FCALL_BY_NAME                                       'DateTime'
         33        DO_FCALL                                      0  $23     
         34        SEND_VAR_NO_REF_EX                                       $23
         35        DO_FCALL                                      0  $24     
         36        SEND_VAR                                                 $24
         37        DO_ICALL                                                 
   14    38        CONCAT                                           ~26     '%3Cpre%3Etotal%3A+', !1
         39        CONCAT                                           ~27     ~26, '%0A24h%3A+'
         40        CONCAT                                           ~28     ~27, !2
         41        CONCAT                                           ~29     ~28, '%3C%2Fpre%3E'
         42        ECHO                                                     ~29
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.72 ms | 1405 KiB | 19 Q