Bug #76201 [Opn->Nab]: ltrim removes extra char

From: Date: Mon, 09 Apr 2018 10:20:52 +0000
Subject: Bug #76201 [Opn->Nab]: ltrim removes extra char
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214662@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76201&edit=1 ID: 76201 Updated by: pmmaga@php.net Reported by: zewy at hotmail dot com Summary: ltrim removes extra char -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: CentOs 7 PHP Version: 7.1.16 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The second parameter of ltrim() is a list of characters to be trimmed. In your first example, 'p' is one of the characters that will be trimmed, so this is expected. Previous Comments: ------------------------------------------------------------------------ [2018-04-09 10:08:27] zewy at hotmail dot com Description: ------------ ltrim removes one extra char but only one some chars Test script: --------------- <?php echo ltrim('http://pexample.com','http://'); echo "\r\n"; echo ltrim('http://aexample.com','http://'); Expected result: ---------------- pexample.com aexample.com Actual result: -------------- example.com aexample.com ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76201&edit=1

« previous php.bugs (#214662) next »