3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.09 ms | 1396 KiB | 23 Q