3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 1388 KiB | 23 Q