3v4l.org

run code in 500+ PHP versions simultaneously
<?php chdir('/tmp'); touch('test1.php'); touch('test2.php'); touch('test3.php'); $it = new GlobIterator("./*.php"); foreach ($it as $p) echo $p->getFilename() . " " . ($p->isFile() ? "IS" : "IS NOT") . " a file\n"; $it = new GlobIterator("*.php"); foreach ($it as $p) echo $p->getFilename() . " " . ($p->isFile() ? "IS" : "IS NOT") . " a file\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 31
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 31
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 51
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 51
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
Branch analysis from position: 31
filename:       /in/aUqLF
function name:  (null)
number of ops:  53
compiled vars:  !0 = $it, !1 = $p
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'chdir'
          1        SEND_VAL                                                     '%2Ftmp'
          2        DO_ICALL                                                     
    5     3        INIT_FCALL                                                   'touch'
          4        SEND_VAL                                                     'test1.php'
          5        DO_ICALL                                                     
    6     6        INIT_FCALL                                                   'touch'
          7        SEND_VAL                                                     'test2.php'
          8        DO_ICALL                                                     
    7     9        INIT_FCALL                                                   'touch'
         10        SEND_VAL                                                     'test3.php'
         11        DO_ICALL                                                     
    9    12        NEW                                                  $6      'GlobIterator'
         13        SEND_VAL_EX                                                  '.%2F%2A.php'
         14        DO_FCALL                                          0          
         15        ASSIGN                                                       !0, $6
   10    16      > FE_RESET_R                                           $9      !0, ->31
         17    > > FE_FETCH_R                                                   $9, !1, ->31
   11    18    >   INIT_METHOD_CALL                                             !1, 'getFilename'
         19        DO_FCALL                                          0  $10     
         20        CONCAT                                               ~11     $10, '+'
         21        INIT_METHOD_CALL                                             !1, 'isFile'
         22        DO_FCALL                                          0  $12     
         23      > JMPZ                                                         $12, ->26
         24    >   QM_ASSIGN                                            ~13     'IS'
         25      > JMP                                                          ->27
         26    >   QM_ASSIGN                                            ~13     'IS+NOT'
         27    >   CONCAT                                               ~14     ~11, ~13
         28        CONCAT                                               ~15     ~14, '+a+file%0A'
         29        ECHO                                                         ~15
   10    30      > JMP                                                          ->17
         31    >   FE_FREE                                                      $9
   13    32        NEW                                                  $16     'GlobIterator'
         33        SEND_VAL_EX                                                  '%2A.php'
         34        DO_FCALL                                          0          
         35        ASSIGN                                                       !0, $16
   14    36      > FE_RESET_R                                           $19     !0, ->51
         37    > > FE_FETCH_R                                                   $19, !1, ->51
   15    38    >   INIT_METHOD_CALL                                             !1, 'getFilename'
         39        DO_FCALL                                          0  $20     
         40        CONCAT                                               ~21     $20, '+'
         41        INIT_METHOD_CALL                                             !1, 'isFile'
         42        DO_FCALL                                          0  $22     
         43      > JMPZ                                                         $22, ->46
         44    >   QM_ASSIGN                                            ~23     'IS'
         45      > JMP                                                          ->47
         46    >   QM_ASSIGN                                            ~23     'IS+NOT'
         47    >   CONCAT                                               ~24     ~21, ~23
         48        CONCAT                                               ~25     ~24, '+a+file%0A'
         49        ECHO                                                         ~25
   14    50      > JMP                                                          ->37
         51    >   FE_FREE                                                      $19
   15    52      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.06 ms | 2191 KiB | 15 Q