3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (scandir("/") as $f) { if (is_dir($f)) { $di = new DirectoryIterator($f); echo sprintf("%30s: %d\n", $di->getPathname(), $di->isDir()); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 23
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/9sLZ0
function name:  (null)
number of ops:  26
compiled vars:  !0 = $f, !1 = $di
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'scandir'
          1        SEND_VAL                                                 '%2F'
          2        DO_ICALL                                         $2      
          3      > FE_RESET_R                                       $3      $2, ->24
          4    > > FE_FETCH_R                                               $3, !0, ->24
    4     5    >   INIT_FCALL                                               'is_dir'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8      > JMPZ                                                     $4, ->23
    5     9    >   NEW                                              $5      'DirectoryIterator'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $5
    6    13        INIT_FCALL                                               'sprintf'
         14        SEND_VAL                                                 '%2530s%3A+%25d%0A'
         15        INIT_METHOD_CALL                                         !1, 'getPathname'
         16        DO_FCALL                                      0  $8      
         17        SEND_VAR                                                 $8
         18        INIT_METHOD_CALL                                         !1, 'isDir'
         19        DO_FCALL                                      0  $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                         $10     
         22        ECHO                                                     $10
    3    23    > > JMP                                                      ->4
         24    >   FE_FREE                                                  $3
    8    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.45 ms | 1395 KiB | 19 Q