3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = '/proc/4/'; if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } readfile('/proc/5/cmdline');
based on Qdjl7
Output for 5.6.28, 7.0.14 - 7.1.0
filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: dir filename: fd : filetype: dir filename: map_files : filetype: dir filename: fdinfo : filetype: dir filename: ns : filetype: dir filename: net : filetype: dir filename: environ : filetype: file filename: auxv : filetype: file filename: status : filetype: file filename: personality : filetype: file filename: limits : filetype: file filename: sched : filetype: file filename: autogroup : filetype: file filename: comm : filetype: file filename: syscall : filetype: file filename: cmdline : filetype: file filename: stat : filetype: file filename: statm : filetype: file filename: maps : filetype: file filename: numa_maps : filetype: file filename: mem : filetype: file filename: cwd : filetype: link filename: root : filetype: link filename: exe : filetype: link filename: mounts : filetype: file filename: mountinfo : filetype: file filename: mountstats : filetype: file filename: clear_refs : filetype: file filename: smaps : filetype: file filename: pagemap : filetype: file filename: attr : filetype: dir filename: wchan : filetype: file filename: stack : filetype: file filename: schedstat : filetype: file filename: cpuset : filetype: file filename: cgroup : filetype: file filename: oom_score : filetype: file filename: oom_adj : filetype: file filename: oom_score_adj : filetype: file filename: coredump_filter : filetype: file filename: io : filetype: file filename: timerslack_ns : filetype: file /usr/bin/daemon--batch
Output for 5.5.24 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.6
filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: dir filename: fd : filetype: dir filename: map_files : filetype: dir filename: fdinfo : filetype: dir filename: ns : filetype: dir filename: net : filetype: dir filename: environ : filetype: file filename: auxv : filetype: file filename: status : filetype: file filename: personality : filetype: file filename: limits : filetype: file filename: sched : filetype: file filename: autogroup : filetype: file filename: comm : filetype: file filename: syscall : filetype: file filename: cmdline : filetype: file filename: stat : filetype: file filename: statm : filetype: file filename: maps : filetype: file filename: numa_maps : filetype: file filename: mem : filetype: file filename: cwd : filetype: link filename: root : filetype: link filename: exe : filetype: link filename: mounts : filetype: file filename: mountinfo : filetype: file filename: mountstats : filetype: file filename: clear_refs : filetype: file filename: smaps : filetype: file filename: pagemap : filetype: file filename: attr : filetype: dir filename: wchan : filetype: file filename: stack : filetype: file filename: schedstat : filetype: file filename: cpuset : filetype: file filename: cgroup : filetype: file filename: oom_score : filetype: file filename: oom_adj : filetype: file filename: oom_score_adj : filetype: file filename: coredump_filter : filetype: file filename: io : filetype: file /usr/bin/daemon--batch
Output for 4.3.0, 5.4.39 - 5.4.45
filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: dir filename: fd : filetype: dir filename: fdinfo : filetype: dir filename: ns : filetype: dir filename: net : filetype: dir filename: environ : filetype: file filename: auxv : filetype: file filename: status : filetype: file filename: personality : filetype: file filename: limits : filetype: file filename: sched : filetype: file filename: autogroup : filetype: file filename: comm : filetype: file filename: syscall : filetype: file filename: cmdline : filetype: file filename: stat : filetype: file filename: statm : filetype: file filename: maps : filetype: file filename: numa_maps : filetype: file filename: mem : filetype: file filename: cwd : filetype: link filename: root : filetype: link filename: exe : filetype: link filename: mounts : filetype: file filename: mountinfo : filetype: file filename: mountstats : filetype: file filename: clear_refs : filetype: file filename: smaps : filetype: file filename: pagemap : filetype: file filename: attr : filetype: dir filename: wchan : filetype: file filename: stack : filetype: file filename: schedstat : filetype: file filename: cpuset : filetype: file filename: cgroup : filetype: file filename: oom_score : filetype: file filename: oom_adj : filetype: file filename: oom_score_adj : filetype: file filename: coredump_filter : filetype: file filename: io : filetype: file /usr/bin/daemon
Output for 5.4.34 - 5.4.38
filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: dir filename: fd : filetype: dir filename: fdinfo : filetype: dir filename: ns : filetype: dir filename: net : filetype: dir filename: environ : filetype: file filename: auxv : filetype: file filename: status : filetype: file filename: personality : filetype: file filename: limits : filetype: file filename: sched : filetype: file filename: autogroup : filetype: file filename: comm : filetype: file filename: syscall : filetype: file filename: cmdline : filetype: file filename: stat : filetype: file filename: statm : filetype: file filename: maps : filetype: file filename: numa_maps : filetype: file filename: mem : filetype: file filename: cwd : filetype: link filename: root : filetype: link filename: exe : filetype: link filename: mounts : filetype: file filename: mountinfo : filetype: file filename: mountstats : filetype: file filename: clear_refs : filetype: file filename: smaps : filetype: file filename: pagemap : filetype: file filename: attr : filetype: dir filename: wchan : filetype: file filename: stack : filetype: file filename: schedstat : filetype: file filename: cpuset : filetype: file filename: cgroup : filetype: file filename: oom_score : filetype: file filename: oom_adj : filetype: file filename: oom_score_adj : filetype: file filename: coredump_filter : filetype: file filename: io : filetype: file /sbin/daemon
Output for 4.3.1 - 5.4.32
filename: . : filetype: dir filename: .. : filetype: dir filename: task : filetype: dir filename: fd : filetype: dir filename: map_files : filetype: dir filename: fdinfo : filetype: dir filename: ns : filetype: dir filename: net : filetype: dir filename: environ : filetype: file filename: auxv : filetype: file filename: status : filetype: file filename: personality : filetype: file filename: limits : filetype: file filename: sched : filetype: file filename: autogroup : filetype: file filename: comm : filetype: file filename: syscall : filetype: file filename: cmdline : filetype: file filename: stat : filetype: file filename: statm : filetype: file filename: maps : filetype: file filename: numa_maps : filetype: file filename: mem : filetype: file filename: cwd : filetype: link filename: root : filetype: link filename: exe : filetype: link filename: mounts : filetype: file filename: mountinfo : filetype: file filename: mountstats : filetype: file filename: clear_refs : filetype: file filename: smaps : filetype: file filename: pagemap : filetype: file filename: attr : filetype: dir filename: wchan : filetype: file filename: stack : filetype: file filename: schedstat : filetype: file filename: cpuset : filetype: file filename: cgroup : filetype: file filename: oom_score : filetype: file filename: oom_adj : filetype: file filename: oom_score_adj : filetype: file filename: coredump_filter : filetype: file filename: io : filetype: file /usr/bin/daemon