Bug #72297 [Opn]: Trim not work as expected.

From: Date: Mon, 30 May 2016 22:46:50 +0000
Subject: Bug #72297 [Opn]: Trim not work as expected.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201356@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72297&edit=1 ID: 72297 User updated by: levaconline at gmail dot com Reported by: levaconline at gmail dot com -Summary: PHP 7.0.5 (cli) (built: Mar 29 2016 18:07:10) ( NTS ) . Not listed in dropdown +Summary: Trim not work as expected. Status: Open Type: Bug Package: Strings related Operating System: Arch linux -PHP Version: 7.0Git-2016-05-30 (snap) +PHP Version: PHP 7.0.5 (cli) (built: Mar 29 2016 18:07:10) ( NTS ) Block user comment: N Private report: N New Comment: Summary improved Previous Comments: ------------------------------------------------------------------------ [2016-05-30 22:43:09] levaconline at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.trim --- This looks like bug in trim function: ------------------------------------------ $name = "File_Manager_Remote.en"; $name = trim($name, '.en'); echo $name; ------------------------------------------ Result: File_Manager_Remot Expected result is: File_Manager_Remote Trim removes one more unexpected character. Test script: --------------- $name = "File_Manager_Remote.en"; $name = trim($name, '.en'); echo $name; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72297&edit=1

« previous php.bugs (#201356) next »