3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('/home/sjon/phpshell/root')) { echo "Directory handle: $handle\n"; echo "Entries:\n"; /* This is the correct way to loop over the directory. */ while (false !== ($entry = readdir($handle))) { echo "$entry\n"; } closedir($handle); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 11
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 11
Branch analysis from position: 20
Branch analysis from position: 11
Branch analysis from position: 23
filename:       /in/WmFm5
function name:  (null)
number of ops:  24
compiled vars:  !0 = $handle, !1 = $entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'opendir'
          1        SEND_VAL                                                 '%2Fhome%2Fsjon%2Fphpshell%2Froot'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                           ~3      !0, $2
          4      > JMPZ                                                     ~3, ->23
    4     5    >   ROPE_INIT                                     3  ~5      'Directory+handle%3A+'
          6        ROPE_ADD                                      1  ~5      ~5, !0
          7        ROPE_END                                      2  ~4      ~5, '%0A'
          8        ECHO                                                     ~4
    5     9        ECHO                                                     'Entries%3A%0A'
    8    10      > JMP                                                      ->14
    9    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~7      !1, '%0A'
         13        ECHO                                                     ~7
    8    14    >   INIT_FCALL                                               'readdir'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $8      
         17        ASSIGN                                           ~9      !1, $8
         18        TYPE_CHECK                                  1018          ~9
         19      > JMPNZ                                                    ~10, ->11
   12    20    >   INIT_FCALL                                               'closedir'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
   13    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 936 KiB | 20 Q