Edit report at https://bugs.php.net/bug.php?id=72449&edit=1
ID: 72449
Updated by: laruence@php.net
Reported by: youbuwei at yeah dot net
Summary: bug of rtrim,ltrim
Status: Re-Opened
Type: Bug
Package: Strings related
Operating System: Mac OS X 10.11.5
PHP Version: 7.0.7
Block user comment: N
Private report: N
New Comment:
do you run any third part extensions?
xdebug, taint?
Previous Comments:
------------------------------------------------------------------------
[2016-06-28 16:44:26] cmb@php.net
The feedback had been provided, so re-opening.
------------------------------------------------------------------------
[2016-06-26 04:22:33] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2016-06-19 03:39:01] youbuwei at yeah dot net
my terminal output is:
Ruolongs-MacBook-Pro:test Ruolong$ php -v
PHP 7.0.7 (cli) (built: Jun 18 2016 10:52:35) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans
Ruolongs-MacBook-Pro:test Ruolong$ cat index.php
<?php
$str = '---12323123123---';
echo trim($str, '-');
echo "\n";
echo rtrim($str, '-');
echo "\n";
echo ltrim($str, '-');
echo "\n";
Ruolongs-MacBook-Pro:test Ruolong$ php -f index.php
12323123123
12323123123
12323123123
------------------------------------------------------------------------
[2016-06-19 03:20:11] requinix@php.net
That, or it's something wrong with your code. Or how you're viewing the output.
Run exactly what you posted from the CLI. Or run it in a browser but do a View Source of the page.
------------------------------------------------------------------------
[2016-06-19 03:18:20] youbuwei at yeah dot net
I know it is fine run on other environment,
I think it must be something wrong at a special environment.
my php configuration is:
./configure --prefix=/usr/local/php7 --with-config-file-path=/etc/php7/
--with-config-file-scan-dir=/etc/php7/conf.d --enable-fpm --enable-phpdbg
--enable-phpdbg-webhelper --with-zlib=/usr/local/opt/zlib --with-zlib-dir=/usr/local/opt/zlib
--enable-bcmath --with-curl --with-libxml-dir=/usr/local/opt/libxml2 --with-gd
--with-xpm-dir=/usr/x11 --with-jpeg-dir=/usr/local/opt/jpeg --with-png-dir=/usr/local/opt/png
--with-freetype-dir=/usr/local/opt/freetype --enable-gd-native-ttf --enable-mbstring
--with-mcrypt=/usr/local/opt/mcrypt --with-mysqli --with-pdo-mysql --enable-mysqlnd
--enable-pcntl --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem
--enable-sysvshm --enable-wddx --with-xmlrpc --with-pcre-dir --with-pear
--with-readline=/usr/local/opt/readline --with-iconv=/usr/local/opt/libiconv
--with-gettext=/usr/local/opt/gettext --with-icu-dir=/usr/local/opt/icu4c --enable-intl
--with-openssl --with-openssl-dir=/usr/local/opt!
/openssl
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=72449
--
Edit this bug report at https://bugs.php.net/bug.php?id=72449&edit=1