3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = "etc"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } }
Output for 8.1.24 - 8.1.27, 8.2.11 - 8.2.17, 8.3.0 - 8.3.4
Warning: filetype(): open_basedir restriction in effect. File(etc.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: . : filetype: Warning: filetype(): open_basedir restriction in effect. File(etc..) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: .. : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcmtab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: mtab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcld.so.conf.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: ld.so.conf.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcpacman.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: pacman.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprofile.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: profile.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcskel) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: skel : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcarch-release) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: arch-release : filetype: Warning: filetype(): open_basedir restriction in effect. File(etccrypttab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: crypttab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcfstab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: fstab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcgroup) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: group : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcgshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: gshadow : filetype: Warning: filetype(): open_basedir restriction in effect. File(etchost.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: host.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etchosts) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: hosts : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcissue) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: issue : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcld.so.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: ld.so.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcmotd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: motd : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcnsswitch.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: nsswitch.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcpasswd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: passwd : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcphp.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: php.ini : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcphp_archive.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: php_archive.ini : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprofile) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: profile : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprotocols) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: protocols : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcresolv.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: resolv.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcsecuretty) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: securetty : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcservices) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: services : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: shadow : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcshells) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: shells : filetype:
Output for 7.4.27 - 7.4.32, 8.0.14 - 8.0.30, 8.1.0 - 8.1.23, 8.2.0 - 8.2.10
Warning: filetype(): open_basedir restriction in effect. File(etc.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: . : filetype: Warning: filetype(): open_basedir restriction in effect. File(etc..) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: .. : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcpacman.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: pacman.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprotocols) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: protocols : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcservices) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: services : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcarch-release) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: arch-release : filetype: Warning: filetype(): open_basedir restriction in effect. File(etccrypttab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: crypttab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcfstab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: fstab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcgroup) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: group : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcgshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: gshadow : filetype: Warning: filetype(): open_basedir restriction in effect. File(etchost.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: host.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etchosts) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: hosts : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcissue) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: issue : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcld.so.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: ld.so.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcld.so.conf.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: ld.so.conf.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcmotd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: motd : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcmtab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: mtab : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcnsswitch.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: nsswitch.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcpasswd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: passwd : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprofile) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: profile : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcprofile.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: profile.d : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcresolv.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: resolv.conf : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcsecuretty) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: securetty : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: shadow : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcshells) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: shells : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcskel) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: skel : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcphp.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: php.ini : filetype: Warning: filetype(): open_basedir restriction in effect. File(etcphp_archive.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/8MKLH on line 8 filename: php_archive.ini : filetype:
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.26, 8.0.0 - 8.0.13
Warning: filetype(): Lstat failed for etc. in /in/8MKLH on line 8 filename: . : filetype: Warning: filetype(): Lstat failed for etc.. in /in/8MKLH on line 8 filename: .. : filetype: Warning: filetype(): Lstat failed for etcpacman.d in /in/8MKLH on line 8 filename: pacman.d : filetype: Warning: filetype(): Lstat failed for etcprotocols in /in/8MKLH on line 8 filename: protocols : filetype: Warning: filetype(): Lstat failed for etcservices in /in/8MKLH on line 8 filename: services : filetype: Warning: filetype(): Lstat failed for etcarch-release in /in/8MKLH on line 8 filename: arch-release : filetype: Warning: filetype(): Lstat failed for etccrypttab in /in/8MKLH on line 8 filename: crypttab : filetype: Warning: filetype(): Lstat failed for etcfstab in /in/8MKLH on line 8 filename: fstab : filetype: Warning: filetype(): Lstat failed for etcgroup in /in/8MKLH on line 8 filename: group : filetype: Warning: filetype(): Lstat failed for etcgshadow in /in/8MKLH on line 8 filename: gshadow : filetype: Warning: filetype(): Lstat failed for etchost.conf in /in/8MKLH on line 8 filename: host.conf : filetype: Warning: filetype(): Lstat failed for etchosts in /in/8MKLH on line 8 filename: hosts : filetype: Warning: filetype(): Lstat failed for etcissue in /in/8MKLH on line 8 filename: issue : filetype: Warning: filetype(): Lstat failed for etcld.so.conf in /in/8MKLH on line 8 filename: ld.so.conf : filetype: Warning: filetype(): Lstat failed for etcld.so.conf.d in /in/8MKLH on line 8 filename: ld.so.conf.d : filetype: Warning: filetype(): Lstat failed for etcmotd in /in/8MKLH on line 8 filename: motd : filetype: Warning: filetype(): Lstat failed for etcmtab in /in/8MKLH on line 8 filename: mtab : filetype: Warning: filetype(): Lstat failed for etcnsswitch.conf in /in/8MKLH on line 8 filename: nsswitch.conf : filetype: Warning: filetype(): Lstat failed for etcpasswd in /in/8MKLH on line 8 filename: passwd : filetype: Warning: filetype(): Lstat failed for etcprofile in /in/8MKLH on line 8 filename: profile : filetype: Warning: filetype(): Lstat failed for etcprofile.d in /in/8MKLH on line 8 filename: profile.d : filetype: Warning: filetype(): Lstat failed for etcresolv.conf in /in/8MKLH on line 8 filename: resolv.conf : filetype: Warning: filetype(): Lstat failed for etcsecuretty in /in/8MKLH on line 8 filename: securetty : filetype: Warning: filetype(): Lstat failed for etcshadow in /in/8MKLH on line 8 filename: shadow : filetype: Warning: filetype(): Lstat failed for etcshells in /in/8MKLH on line 8 filename: shells : filetype: Warning: filetype(): Lstat failed for etcskel in /in/8MKLH on line 8 filename: skel : filetype:
Output for 7.4.33
Warning: filetype(): Lstat failed for etc. in /in/8MKLH on line 8 filename: . : filetype: Warning: filetype(): Lstat failed for etc.. in /in/8MKLH on line 8 filename: .. : filetype: Warning: filetype(): Lstat failed for etcpacman.d in /in/8MKLH on line 8 filename: pacman.d : filetype: Warning: filetype(): Lstat failed for etcprotocols in /in/8MKLH on line 8 filename: protocols : filetype: Warning: filetype(): Lstat failed for etcservices in /in/8MKLH on line 8 filename: services : filetype: Warning: filetype(): Lstat failed for etcarch-release in /in/8MKLH on line 8 filename: arch-release : filetype: Warning: filetype(): Lstat failed for etccrypttab in /in/8MKLH on line 8 filename: crypttab : filetype: Warning: filetype(): Lstat failed for etcfstab in /in/8MKLH on line 8 filename: fstab : filetype: Warning: filetype(): Lstat failed for etcgroup in /in/8MKLH on line 8 filename: group : filetype: Warning: filetype(): Lstat failed for etcgshadow in /in/8MKLH on line 8 filename: gshadow : filetype: Warning: filetype(): Lstat failed for etchost.conf in /in/8MKLH on line 8 filename: host.conf : filetype: Warning: filetype(): Lstat failed for etchosts in /in/8MKLH on line 8 filename: hosts : filetype: Warning: filetype(): Lstat failed for etcissue in /in/8MKLH on line 8 filename: issue : filetype: Warning: filetype(): Lstat failed for etcld.so.conf in /in/8MKLH on line 8 filename: ld.so.conf : filetype: Warning: filetype(): Lstat failed for etcld.so.conf.d in /in/8MKLH on line 8 filename: ld.so.conf.d : filetype: Warning: filetype(): Lstat failed for etcmotd in /in/8MKLH on line 8 filename: motd : filetype: Warning: filetype(): Lstat failed for etcmtab in /in/8MKLH on line 8 filename: mtab : filetype: Warning: filetype(): Lstat failed for etcnsswitch.conf in /in/8MKLH on line 8 filename: nsswitch.conf : filetype: Warning: filetype(): Lstat failed for etcpasswd in /in/8MKLH on line 8 filename: passwd : filetype: Warning: filetype(): Lstat failed for etcprofile in /in/8MKLH on line 8 filename: profile : filetype: Warning: filetype(): Lstat failed for etcprofile.d in /in/8MKLH on line 8 filename: profile.d : filetype: Warning: filetype(): Lstat failed for etcresolv.conf in /in/8MKLH on line 8 filename: resolv.conf : filetype: Warning: filetype(): Lstat failed for etcsecuretty in /in/8MKLH on line 8 filename: securetty : filetype: Warning: filetype(): Lstat failed for etcshadow in /in/8MKLH on line 8 filename: shadow : filetype: Warning: filetype(): Lstat failed for etcshells in /in/8MKLH on line 8 filename: shells : filetype: Warning: filetype(): Lstat failed for etcskel in /in/8MKLH on line 8 filename: skel : filetype: Warning: filetype(): Lstat failed for etcphp.ini in /in/8MKLH on line 8 filename: php.ini : filetype: Warning: filetype(): Lstat failed for etcphp_archive.ini in /in/8MKLH on line 8 filename: php_archive.ini : filetype:
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2

preferences:
307.22 ms | 402 KiB | 464 Q