Re: Re: What do you get for ...
| From: | Richard Quadling | Date: | Tue, 07 Jun 2011 12:16:52 +0000 |
| Subject: | Re: Re: What do you get for ... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313436@lists.php.net to get a copy of this message | ||
On 7 June 2011 13:04, Geoff Lane <geoff@gjctech.co.uk> wrote:
> On Tuesday, June 7, 2011, Richard Quadling wrote:
>
>> What do you get for ...
>
>> php -r "var_dump(realpath(null));"
>
> PHP 5.3.5-1ubuntu7.2 on Ubuntu 11.04 kernel 2.6.18 returns the same
> value as __DIR__
>
> However, PHP 5.1.6 on CentOS 5.6 kernel 2.6.18 returns bool(false).
__DIR__ was introduced in PHP5.3.0.
When I mentioned it, I meant the value would be the directory of the
script path.
dirname(__FILE__) or __DIR__. Same difference.
But the surprising issue is that your 5.1.6 returns bool(false). So
far, that's the only report I've got that shows inconsistent behaviour
for PHP5+
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea