Bug #80130 [Opn]: Wrong result of pathinfo function with PATHINFO_FILENAME parameter

From: Date: Mon, 21 Sep 2020 22:17:37 +0000
Subject: Bug #80130 [Opn]: Wrong result of pathinfo function with PATHINFO_FILENAME parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229118@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80130&edit=1 ID: 80130 Updated by: cmb@php.net Reported by: he dot expande at gmail dot com Summary: Wrong result of pathinfo function with PATHINFO_FILENAME parameter Status: Open Type: Bug Package: *Directory/Filesystem functions Operating System: Debian 10 (buster) PHP Version: 7.4.10 Block user comment: N Private report: N New Comment: pathinfo() is locale aware[1][2], so please double-check whether the two scripts run under the same locale. Interestingly, with the "C" locale, only PHP 8.0 produces the expected result[3]. [1] <https://www.php.net/pathinfo> [2] <https://3v4l.org/51S9F> [3] <https://3v4l.org/2r9F2> Previous Comments: ------------------------------------------------------------------------ [2020-09-21 18:47:50] he dot expande at gmail dot com Description: ------------ Information about the software on which the problem is observed: > php -v PHP 7.4.10 (cli) (built: Sep 10 2020 14:00:50) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.10, Copyright (c), by Zend Technologies with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans > php test.php /var/www/test.php:3: string(36) " экрана 2020-09-21 в 13.05.29" Information about the software on which the correct behavior: >php -v PHP 7.3.2 (cli) (built: Feb 5 2019 22:19:09) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.2, Copyright (c) 1999-2018, by Zend Technologies > php test.php string(48) "Снимок экрана 2020-09-21 в 13.05.29" Test script: --------------- <?php var_dump(pathinfo('Снимок экрана 2020-09-21 в 13.05.29.png', PATHINFO_FILENAME)); Expected result: ---------------- string(48) "Снимок экрана 2020-09-21 в 13.05.29" Actual result: -------------- string(36) " экрана 2020-09-21 в 13.05.29" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80130&edit=1

« previous php.bugs (#229118) next »