svn: /phpdoc/en/trunk/reference/spl/splfileinfo/ getrealpath.xml

From: Date: Fri, 04 Sep 2015 17:42:41 +0000
Subject: svn: /phpdoc/en/trunk/reference/spl/splfileinfo/ getrealpath.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13710@lists.php.net to get a copy of this message
philip Fri, 04 Sep 2015 17:42:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337752 Log: 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 Changed paths: U phpdoc/en/trunk/reference/spl/splfileinfo/getrealpath.xml Modified: phpdoc/en/trunk/reference/spl/splfileinfo/getrealpath.xml =================================================================== --- phpdoc/en/trunk/reference/spl/splfileinfo/getrealpath.xml 2015-09-04 17:29:14 UTC (rev 337751) +++ phpdoc/en/trunk/reference/spl/splfileinfo/getrealpath.xml 2015-09-04 17:42:41 UTC (rev 337752) @@ -26,7 +26,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns the path to the file. + Returns the path to the file, or &false; if the file does not exist. </para> </refsect1> @@ -43,6 +43,12 @@ $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()); ?> ]]> </programlisting> @@ -51,6 +57,8 @@ <![CDATA[ string(28) "/private/tmp/phptempfile.php" string(12) "/private/tmp" +bool(false) +string(12) "/private/tmp" ]]> </screen> </example> @@ -62,6 +70,7 @@ <para> <simplelist> <member><methodname>SplFileInfo::isLink</methodname></member> + <member><methodname>realpath</methodname></member> </simplelist> </para> </refsect1>

« previous php.doc.cvs (#13710) next »