3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.52 ms | 1395 KiB | 15 Q