From 3a18df636a4581db27c46337bd25710888730a68 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 4 Sep 2015 17:42:41 +0000 Subject: [PATCH] Expanded docs to take into account empty file names and missing files, and linked to realpath(). This deals with a user note by josef.vlk.d@gmail.com git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337752 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/splfileinfo/getrealpath.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reference/spl/splfileinfo/getrealpath.xml b/reference/spl/splfileinfo/getrealpath.xml index 1d11decd14..42f853bfb3 100644 --- a/reference/spl/splfileinfo/getrealpath.xml +++ b/reference/spl/splfileinfo/getrealpath.xml @@ -26,7 +26,7 @@ &reftitle.returnvalues; - Returns the path to the file. + Returns the path to the file, or &false; if the file does not exist. @@ -43,6 +43,12 @@ var_dump($info->getRealPath()); $info = new SplFileInfo('/tmp'); var_dump($info->getRealPath()); + +$info = new SplFileInfo('/I/Do/Not/Exist'); +var_dump($info->getRealPath()); + +$info = new SplFileInfo(""); +var_dump($info->getRealPath()); ?> ]]> @@ -51,6 +57,8 @@ var_dump($info->getRealPath()); @@ -62,6 +70,7 @@ string(12) "/private/tmp" SplFileInfo::isLink + realpath