array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'splfileinfo.isfile.php', 1 => 'SplFileInfo::isFile', 2 => 'Tells if the object references a regular file', ), 'up' => array ( 0 => 'class.splfileinfo.php', 1 => 'SplFileInfo', ), 'prev' => array ( 0 => 'splfileinfo.isexecutable.php', 1 => 'SplFileInfo::isExecutable', ), 'next' => array ( 0 => 'splfileinfo.islink.php', 1 => 'SplFileInfo::isLink', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splfileinfo/isfile.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::isFile — Tells if the object references a regular file
Checks if the file referenced by this SplFileInfo object exists and is a regular file.
Diese Funktion besitzt keine Parameter.
Beispiel #1 SplFileInfo::isFile() example
<?php
$info = new SplFileInfo(__FILE__);
var_dump($info->isFile());
$info = new SplFileInfo(dirname(__FILE__));
var_dump($info->isFile());
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
bool(true) bool(false)