Re: RE: Re: [PHP] pathinfo function
| From: | Tim Streater | Date: | Wed, 27 Jul 2011 13:32:00 +0000 |
| Subject: | Re: RE: Re: [PHP] pathinfo function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-314217@lists.php.net to get a copy of this message | ||
On 27 Jul 2011 at 11:09, Mike Ford <M.Ford@leedsmet.ac.uk> wrote:
>> -----Original Message-----
>> From: Tim Streater [mailto:tim@clothears.org.uk]
>> Seems to me that's the case. However the doc is ambiguous,
>> especially as I *asked* for that key to be returned. IMO it should
>> exist and be empty. Not existing is only OK if I didn't ask for it.
>
> This is how you tell the difference between a basename with a null
> extension ("/path/filename.") and no extension ("/path/filename").
> In the former case you get $info["extension"]=>"", in the latter
> there is no ["extension"] element in the returned array.
OK, this makes sense.
> This does seem like the most logical way to make this distinction,
> but the manual could use a bit of work to document this and other
> edge cases more explicitly.
I may have a go at this if I can find a round tuit.
--
Cheers -- Tim