|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-27 07:42 UTC] myustc at 163 dot com
Description: ------------ --- From manual page: http://www.php.net/function.realpath#refsect1-function.realpath-changelog --- I'm using PHP 5.3.15 (cli) (built: Jul 31 2012 18:42:11). When I'm tracking a bug in Yii, I realized that it's the issue of php function realpath(). the reproducing is very easy, just run this in console: php -r "var_dump(realpath(false), realpath(null), realpath(''));" Test script: --------------- <?php var_dump(realpath(false)); var_dump(realpath(null)); var_dump(realpath('')); Expected result: ---------------- I should see output as below: bool(false) bool(false) bool(false) Actual result: -------------- output:(the actual path depends) string(22) "/Users/yaowenh/phpunit" string(22) "/Users/yaowenh/phpunit" string(22) "/Users/yaowenh/phpunit" Patcheschangelog (last revision 2015-04-23 21:13 UTC by cmb@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 17:00:01 2025 UTC |
I don't see the problem here? From the manual: path The path being checked. Note: Whilst a path must be supplied, the value can be blank or NULL In these cases, the value is interpreted as the current directory.