3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = '/home/example/public_html/temp/'; if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { $path_parts = pathinfo($path . $file); $fileName = $path_parts['filename']; if((time() - strtotime($fileName)) > 24*30*3600) { unlink($path . $file); } } closedir($handle); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 35
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 7
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 7
Branch analysis from position: 32
Branch analysis from position: 7
Branch analysis from position: 26
Branch analysis from position: 35
filename:       /in/pKrnt
function name:  (null)
number of ops:  36
compiled vars:  !0 = $path, !1 = $handle, !2 = $path_parts, !3 = $file, !4 = $fileName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fhome%2Fexample%2Fpublic_html%2Ftemp%2F'
    3     1        INIT_FCALL                                               'opendir'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                           ~7      !1, $6
          5      > JMPZ                                                     ~7, ->35
    5     6    > > JMP                                                      ->26
    6     7    >   INIT_FCALL                                               'pathinfo'
          8        CONCAT                                           ~8      !0, !3
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    7    12        FETCH_DIM_R                                      ~11     !2, 'filename'
         13        ASSIGN                                                   !4, ~11
    9    14        INIT_FCALL                                               'time'
         15        DO_ICALL                                         $13     
         16        INIT_FCALL                                               'strtotime'
         17        SEND_VAR                                                 !4
         18        DO_ICALL                                         $14     
         19        SUB                                              ~15     $13, $14
         20        IS_SMALLER                                               2592000, ~15
         21      > JMPZ                                                     ~16, ->26
   11    22    >   INIT_FCALL                                               'unlink'
         23        CONCAT                                           ~17     !0, !3
         24        SEND_VAL                                                 ~17
         25        DO_ICALL                                                 
    5    26    >   INIT_FCALL                                               'readdir'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $19     
         29        ASSIGN                                           ~20     !3, $19
         30        TYPE_CHECK                                  1018          ~20
         31      > JMPNZ                                                    ~21, ->7
   15    32    >   INIT_FCALL                                               'closedir'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
   17    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.14 ms | 1012 KiB | 20 Q