3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clearAllCache($path) { $is_dot = array ('.', '..'); if (is_dir($path)) { $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if (version_compare(phpversion(), '5.2.17', '<=')) { if (in_array($file->getBasename(), $is_dot)) continue; } elseif (version_compare(phpversion(), '5.3', '<')) { if ($file->isDot()) continue; } if ($file->getBasename() !== 'index.php') unlink($file->getPathname()); } unset($iterator, $file); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i6Rok
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E > > RETURN                                                   1

Function clearallcache:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 58
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 55
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 55
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 33
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 32
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 54
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 54
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 45
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 45
Branch analysis from position: 45
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
Branch analysis from position: 58
filename:       /in/i6Rok
function name:  clearAllCache
number of ops:  59
compiled vars:  !0 = $path, !1 = $is_dot, !2 = $iterator, !3 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'is_dir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5      > JMPZ                                                     $5, ->58
    9     6    >   NEW                                              $6      'RecursiveIteratorIterator'
   10     7        NEW                                              $7      'RecursiveDirectoryIterator'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $7
   11    11        SEND_VAL_EX                                              1
         12        DO_FCALL                                      0          
    9    13        ASSIGN                                                   !2, $6
   14    14      > FE_RESET_R                                       $11     !2, ->55
         15    > > FE_FETCH_R                                               $11, !3, ->55
   16    16    >   INIT_FCALL                                               'version_compare'
         17        INIT_FCALL                                               'phpversion'
         18        DO_ICALL                                         $12     
         19        SEND_VAR                                                 $12
         20        SEND_VAL                                                 '5.2.17'
         21        SEND_VAL                                                 '%3C%3D'
         22        DO_ICALL                                         $13     
         23      > JMPZ                                                     $13, ->33
   18    24    >   INIT_FCALL                                               'in_array'
         25        INIT_METHOD_CALL                                         !3, 'getBasename'
         26        DO_FCALL                                      0  $14     
         27        SEND_VAR                                                 $14
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                         $15     
         30      > JMPZ                                                     $15, ->32
   19    31    > > JMP                                                      ->15
         32    > > JMP                                                      ->45
   21    33    >   INIT_FCALL                                               'version_compare'
         34        INIT_FCALL                                               'phpversion'
         35        DO_ICALL                                         $16     
         36        SEND_VAR                                                 $16
         37        SEND_VAL                                                 '5.3'
         38        SEND_VAL                                                 '%3C'
         39        DO_ICALL                                         $17     
         40      > JMPZ                                                     $17, ->45
   23    41    >   INIT_METHOD_CALL                                         !3, 'isDot'
         42        DO_FCALL                                      0  $18     
         43      > JMPZ                                                     $18, ->45
   24    44    > > JMP                                                      ->15
   26    45    >   INIT_METHOD_CALL                                         !3, 'getBasename'
         46        DO_FCALL                                      0  $19     
         47        IS_NOT_IDENTICAL                                         $19, 'index.php'
         48      > JMPZ                                                     ~20, ->54
   27    49    >   INIT_FCALL                                               'unlink'
         50        INIT_METHOD_CALL                                         !3, 'getPathname'
         51        DO_FCALL                                      0  $21     
         52        SEND_VAR                                                 $21
         53        DO_ICALL                                                 
   14    54    > > JMP                                                      ->15
         55    >   FE_FREE                                                  $11
   29    56        UNSET_CV                                                 !2
         57        UNSET_CV                                                 !3
   31    58    > > RETURN                                                   null

End of function clearallcache

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.16 ms | 1400 KiB | 23 Q