note 76433 rejected from function.pathinfo by didou
| From: | didou@php.net | Date: | Wed, 17 Apr 2019 10:48:07 +0000 |
| Subject: | note 76433 rejected from function.pathinfo by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210611@lists.php.net to get a copy of this message | ||
Note Submitter: avi-team at inbox dot lv
----
You shouldn't assign values as it is described in previous post
// wrong:
list( $dirname, $basename, $extension, $filename ) = array_values( pathinfo($file) );
if $file has no extension, you get wrong variable values: $extension would be assigned with
'filename' array element of pathinfo() result, but $filename - would be empty.