3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.33 ms | 1387 KiB | 21 Q