#39814 [Opn->Fbk]: is_numeric() timeout/infinite loop on long numeric strings
| From: | tony2001@php.net | Date: | Wed, 13 Dec 2006 12:12:55 +0000 |
| Subject: | #39814 [Opn->Fbk]: is_numeric() timeout/infinite loop on long numeric strings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106304@lists.php.net to get a copy of this message | ||
ID: 39814
Updated by: tony2001@php.net
Reported By: tim at digicol dot de
-Status: Open
+Status: Feedback
Bug Type: Variables related
Operating System: Linux 2.4 (SuSE SLES 8.1)
PHP Version: 5.2.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-12-13 12:00:08] tim at digicol dot de
Description:
------------
Hi,
the example code is taking forever (i.e., not terminating at all) on
one of our Linux boxes:
uname -a
Linux dc5test 2.4.21-241-smp #1 SMP Tue Aug 10 15:55:34 UTC 2004 i686
unknown
cat /etc/SuSE-release
SuSE SLES-8 (i386)
VERSION = 8.1
php -i | grep configure
./configure --with-libxml-dir=/services/usr/bin
--prefix=/services/webserver/php/php-5.2.0
--with-db4=/services/database/db4/active --with-sqlite --enable-dba
--with-apxs2=/services/webserver/apache/active/bin/apxs --with-bz2
--with-dom --with-gd --with-iconv --enable-sockets --with-zlib
--disable-debug --enable-inline-optimization --enable-memory-limit
--enable-magic-quotes --enable-safe-mode --enable-sigchild
--enable-pcntl --with-oci8=/opt/oracle/product/9.2.0 --disable-ctype
--without-mysql --enable-cli --with-pear --enable-exif --enable-ftp
--enable-mbstring --with-libxml-dir=/services/usr
Changes compared to php.ini-recommended:
short_open_tag = On
memory_limit = 82M
error_log = /dot/dc/logs/php4_error.log
post_max_size = 64M
date.timezone = Europe/Berlin
browscap = /dot/dc/system/install/init/browscap.ini
session.save_path = "/tmp"
session.gc_divisor = 100
session.gc_maxlifetime = 43200
url_rewriter.tags = ""
mbstring.internal_encoding = UTF-8
The funny thing is that the same code runs fine on our other servers
(which run various 32bit and 64bit SuSE versions, but Linux 2.6 instead
of 2.4).
I can work around this problem (and I don't really care whether
is_numeric() returns true or false in this case), but I thought you
might be interested anyway.
Thanks for your attention,
Tim
Reproduce code:
---------------
php -r 'echo is_numeric("16743175142160148228252851852361751021052084")
. "\n";'
Expected result:
----------------
1
Actual result:
--------------
[no result, script runs forever]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39814&edit=1