3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.54 ms | 1395 KiB | 21 Q