3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('/etc/')) { $blacklist = array('.', '..', 'somedir', 'somefile.php'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { echo "$file\n"; } } closedir($handle); } ?>
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 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
Branch analysis from position: 7
Branch analysis from position: 16
Branch analysis from position: 25
filename:       /in/3Y1Vk
function name:  (null)
number of ops:  26
compiled vars:  !0 = $handle, !1 = $blacklist, !2 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'opendir'
          1        SEND_VAL                                                 '%2Fetc%2F'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                           ~4      !0, $3
          4      > JMPZ                                                     ~4, ->25
    5     5    >   ASSIGN                                                   !1, <array>
    6     6      > JMP                                                      ->16
    7     7    >   INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        BOOL_NOT                                         ~7      $6
         12      > JMPZ                                                     ~7, ->16
    8    13    >   NOP                                                      
         14        FAST_CONCAT                                      ~8      !2, '%0A'
         15        ECHO                                                     ~8
    6    16    >   INIT_FCALL                                               'readdir'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
         19        ASSIGN                                           ~10     !2, $9
         20        TYPE_CHECK                                  1018          ~10
         21      > JMPNZ                                                    ~11, ->7
   11    22    >   INIT_FCALL                                               'closedir'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
   14    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.38 ms | 1388 KiB | 21 Q