Re: Re: [PHP] pathinfo function

From: Date: Wed, 27 Jul 2011 08:57:00 +0000
Subject: Re: Re: [PHP] pathinfo function
Groups: php.general 
Request: Send a blank email to php-general+get-314214@lists.php.net to get a copy of this message
On 26 Jul 2011 at 23:55, Micky Hulse <rgmicky@gmail.com> wrote: > On Tue, Jul 26, 2011 at 3:47 PM, Tim Streater <tim@clothears.org.uk> wrote: >> that I will get an error if I try to reference $info["extension"] ?? > > From what I can tell via reading the docs: > > "The following associative array elements are returned: dirname, > basename, extension (if any), and filename." > <http://php.net/pathinfo> > > Makes me think that if the extension does not exist, then the > "extension" key will not exist. 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. -- Cheers -- Tim

« previous php.general (#314214) next »