3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { /*** freds home directory ***/ $rdi = new recursiveDirectoryIterator('/tmp', FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS); $it = new recursiveIteratorIterator( $rdi ); $it->seek(2); while( $it->valid()) { if( $it->isFile() ) { echo $it->current()."\n"; } /*** move to the next element ***/ $it->next(); } $it->rewind(); echo $it->current(); } catch(Exception $e) { /*** echo the error message ***/ echo $e->getMessage(); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
Branch analysis from position: 13
Branch analysis from position: 20
Found catch point at position: 31
Branch analysis from position: 31
2 jumps found. (Code = 107) Position 1 = 32, Position 2 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EXmG4
function name:  (null)
number of ops:  36
compiled vars:  !0 = $rdi, !1 = $it, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'recursiveDirectoryIterator'
          1        SEND_VAL_EX                                              '%2Ftmp'
          2        SEND_VAL_EX                                              12288
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
    6     5        NEW                                              $6      'recursiveIteratorIterator'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
    7     9        INIT_METHOD_CALL                                         !1, 'seek'
         10        SEND_VAL_EX                                              2
         11        DO_FCALL                                      0          
    8    12      > JMP                                                      ->22
   10    13    >   INIT_METHOD_CALL                                         !1, 'isFile'
         14        DO_FCALL                                      0  $10     
         15      > JMPZ                                                     $10, ->20
   12    16    >   INIT_METHOD_CALL                                         !1, 'current'
         17        DO_FCALL                                      0  $11     
         18        CONCAT                                           ~12     $11, '%0A'
         19        ECHO                                                     ~12
   16    20    >   INIT_METHOD_CALL                                         !1, 'next'
         21        DO_FCALL                                      0          
    8    22    >   INIT_METHOD_CALL                                         !1, 'valid'
         23        DO_FCALL                                      0  $14     
         24      > JMPNZ                                                    $14, ->13
   18    25    >   INIT_METHOD_CALL                                         !1, 'rewind'
         26        DO_FCALL                                      0          
   20    27        INIT_METHOD_CALL                                         !1, 'current'
         28        DO_FCALL                                      0  $16     
         29        ECHO                                                     $16
         30      > JMP                                                      ->35
   22    31  E > > CATCH                                       last         'Exception'
   25    32    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         33        DO_FCALL                                      0  $17     
         34        ECHO                                                     $17
   27    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.9 ms | 1399 KiB | 13 Q