Bug #81236 [Com]: Arbitrary loss of last char in rtrim result
| From: | danack@php.net | Date: | Thu, 08 Jul 2021 15:13:46 +0000 |
| Subject: | Bug #81236 [Com]: Arbitrary loss of last char in rtrim result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234922@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81236&edit=1
ID: 81236
Comment by: danack@php.net
Reported by: dev at solon dot media
Summary: Arbitrary loss of last char in rtrim result
Status: Not a bug
Type: Bug
Package: Strings related
Operating System: RHEL
PHP Version: 7.3.29
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
"Simply list all characters that you want to be stripped."
e is in the list.
Previous Comments:
------------------------------------------------------------------------
[2021-07-08 15:07:07] cmb@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2021-07-08 15:03:23] dev at solon dot media
Description:
------------
rtrim under odd circumstances returns a truncated string.
Test script:
---------------
<?php
$str = "performance-details";
echo rtrim($str,"-details");
?>
Expected result:
----------------
Should return 'performance'
Actual result:
--------------
Returns 'performanc' - the final e is dropped.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81236&edit=1