note 124841 deleted from function.pathinfo by cmb
| From: | cmb@php.net | Date: | Sun, 22 Mar 2020 14:25:16 +0000 |
| Subject: | note 124841 deleted from function.pathinfo by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214359@lists.php.net to get a copy of this message | ||
Note Submitter: TanShun
----
If dirname contains multibyte characters, phpinfo() can't parse correctly, eg:
<?php
var_dump(pathinfo('D:\\pictures\\ä½ å¥½\\ä¸ç.jpg'));
?>
The result is:
array(4) {
'dirname' =>
string(11) "D:\pictures"
'basename' =>
string(10) "ä¸ç.jpg"
'extension' =>
string(3) "jpg"
'filename' =>
string(6) "ä¸ç"
}
The dirname is not "D:\pictures\ä½ å¥½", The multibyte characters were stripped
away.