|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25665 var_dump/print_r hang on NaN and INF
Submitted: 2003-09-25 23:21 UTC Modified: 2005-12-14 01:00 UTC
Avg. Score:3.9 ± 0.8
Reproduced:8 of 8 (100.0%)
Same Version:3 (37.5%)
Same OS:2 (25.0%)
From: Assigned: helly (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5CVS, 4CVS OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
6 + 5 = ?
Subscribe to this entry?

 [2003-09-25 23:21 UTC]
Summary and reproducing code say all...

I tested it on a 4.3.0 and got 


which isn't correct on the var_dump behaviour either, but at least I hadn't had a hanging program.

Reproduce code:

Expected result:
Some output saying NaN and INF.

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-26 05:46 UTC]
It's the ap_php_cvt() which ends up in endless loop since it can't handle infinite numbers at all. In PHP 4.2.3 the output
of var_dump(log(0)); is float(-INF).. broke this, fix it.

 [2003-09-28 21:07 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

 [2004-06-03 11:04 UTC] neilus at dcs dot kcl dot ac dot uk
this is re-occurring in the 4.3 branch tests, so either the test or bug needs to be fixed
 [2004-06-03 20:42 UTC]
Which platform are you running?
 [2004-06-18 14:18 UTC] scott_heffner at hotmail dot com
Can't speak for the original poster, but I've run into this issue on Solaris 8 for x86.

 [2004-06-18 20:49 UTC]
Could you please edit the following file:
and duplicate the '-INF' lines to also test 'INF'?

Then please report the output of 
php run-tests.php ext/standard/tests/math/bug25665.phpt

I suspect all but -INF works, right?
 [2005-10-08 11:09 UTC]
Could reproduce that bug with 4.4.1RC1 on Cygwin
 [2005-10-08 14:28 UTC]
Assigned to the maintainer of this part.. :)

 [2005-10-09 10:45 UTC]
Could reproduce it also on Solaris 10 (Sparc) with latest 4CVS
 [2005-10-18 15:42 UTC]
Could reproduce with 5.1.0RC3 on Cygwin
 [2005-12-07 00:26 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-12-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 08:01:30 2024 UTC