3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dh = opendir('/proc/'.getmypid()); while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
Branch analysis from position: 8
filename:       /in/YV22D
function name:  (null)
number of ops:  28
compiled vars:  !0 = $dh, !1 = $file, !2 = $dir
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'opendir'
          1        INIT_FCALL                                               'getmypid'
          2        DO_ICALL                                         $3      
          3        CONCAT                                           ~4      '%2Fproc%2F', $3
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
    3     7      > JMP                                                      ->18
    4     8    >   ROPE_INIT                                     3  ~8      'filename%3A+'
          9        ROPE_ADD                                      1  ~8      ~8, !1
         10        ROPE_END                                      2  ~7      ~8, '+%3A+filetype%3A+'
         11        INIT_FCALL                                               'filetype'
         12        CONCAT                                           ~10     !2, !1
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                         $11     
         15        CONCAT                                           ~12     ~7, $11
         16        CONCAT                                           ~13     ~12, '%0A'
         17        ECHO                                                     ~13
    3    18    >   INIT_FCALL                                               'readdir'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $14     
         21        ASSIGN                                           ~15     !1, $14
         22        TYPE_CHECK                                  1018          ~15
         23      > JMPNZ                                                    ~16, ->8
    6    24    >   INIT_FCALL                                               'closedir'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.56 ms | 1395 KiB | 23 Q