3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dh = opendir('/proc/'.getmypid()); $out = ''; while (($file = readdir($dh)) !== false) { $out .= "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); echo $out;
Output for 7.0.20 - 7.2.0
Notice: Undefined variable: dir in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for task in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for fd in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for map_files in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for fdinfo in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for ns in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for net in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for environ in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for auxv in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for status in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for personality in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for limits in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for sched in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for autogroup in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for comm in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for syscall in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for cmdline in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for stat in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for statm in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for maps in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for numa_maps in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for mem in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for cwd in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for exe in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for mounts in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for mountinfo in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for mountstats in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for clear_refs in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for smaps in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for pagemap in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for attr in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for wchan in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for stack in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for schedstat in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for cpuset in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for cgroup in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for oom_score in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for oom_adj in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for oom_score_adj in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for coredump_filter in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for io in /in/7Ueah on line 5 Notice: Undefined variable: dir in /in/7Ueah on line 5 Warning: filetype(): Lstat failed for timerslack_ns in /in/7Ueah on line 5 filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: filename: fd : filetype: filename: map_files : filetype: filename: fdinfo : filetype: filename: ns : filetype: filename: net : filetype: filename: environ : filetype: filename: auxv : filetype: filename: status : filetype: filename: personality : filetype: filename: limits : filetype: filename: sched : filetype: filename: autogroup : filetype: filename: comm : filetype: filename: syscall : filetype: filename: cmdline : filetype: filename: stat : filetype: filename: statm : filetype: filename: maps : filetype: filename: numa_maps : filetype: filename: mem : filetype: filename: cwd : filetype: filename: root : filetype: dir filename: exe : filetype: filename: mounts : filetype: filename: mountinfo : filetype: filename: mountstats : filetype: filename: clear_refs : filetype: filename: smaps : filetype: filename: pagemap : filetype: filename: attr : filetype: filename: wchan : filetype: filename: stack : filetype: filename: schedstat : filetype: filename: cpuset : filetype: filename: cgroup : filetype: filename: oom_score : filetype: filename: oom_adj : filetype: filename: oom_score_adj : filetype: filename: coredump_filter : filetype: filename: io : filetype: filename: timerslack_ns : filetype: