3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('/home/')) { 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"; } /* This is the WRONG way to loop over the directory. */ while ($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 = 32
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 = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
Branch analysis from position: 21
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: 32
filename:       /in/4belV
function name:  (null)
number of ops:  33
compiled vars:  !0 = $handle, !1 = $entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'opendir'
          1        SEND_VAL                                                 '%2Fhome%2F'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                           ~3      !0, $2
          4      > JMPZ                                                     ~3, ->32
    3     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
    4     9        ECHO                                                     'Entries%3A%0A'
    7    10      > JMP                                                      ->14
    8    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~7      !1, '%0A'
         13        ECHO                                                     ~7
    7    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    > > JMP                                                      ->24
   13    21    >   NOP                                                      
         22        FAST_CONCAT                                      ~11     !1, '%0A'
         23        ECHO                                                     ~11
   12    24    >   INIT_FCALL                                               'readdir'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $12     
         27        ASSIGN                                           ~13     !1, $12
         28      > JMPNZ                                                    ~13, ->21
   16    29    >   INIT_FCALL                                               'closedir'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
   17    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.02 ms | 1396 KiB | 19 Q