3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = dir(getcwd()); echo "Handle: " . $d->handle . "\n"; echo "Path: " . $d->path . "\n"; while (false !== ($entry = $d->read())) { echo $entry."\n"; } $d->close();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
Branch analysis from position: 15
filename:       /in/XNkZT
function name:  (null)
number of ops:  25
compiled vars:  !0 = $d, !1 = $entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'dir'
          1        INIT_FCALL                                               'getcwd'
          2        DO_ICALL                                         $2      
          3        SEND_VAR                                                 $2
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    4     6        FETCH_OBJ_R                                      ~5      !0, 'handle'
          7        CONCAT                                           ~6      'Handle%3A+', ~5
          8        CONCAT                                           ~7      ~6, '%0A'
          9        ECHO                                                     ~7
    5    10        FETCH_OBJ_R                                      ~8      !0, 'path'
         11        CONCAT                                           ~9      'Path%3A+', ~8
         12        CONCAT                                           ~10     ~9, '%0A'
         13        ECHO                                                     ~10
    6    14      > JMP                                                      ->17
    7    15    >   CONCAT                                           ~11     !1, '%0A'
         16        ECHO                                                     ~11
    6    17    >   INIT_METHOD_CALL                                         !0, 'read'
         18        DO_FCALL                                      0  $12     
         19        ASSIGN                                           ~13     !1, $12
         20        TYPE_CHECK                                  1018          ~13
         21      > JMPNZ                                                    ~14, ->15
    9    22    >   INIT_METHOD_CALL                                         !0, 'close'
         23        DO_FCALL                                      0          
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.16 ms | 1395 KiB | 17 Q