Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3672222
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:34:57+00:00 2026-05-19T02:34:57+00:00

I just read an interesting article about php hanging on certain float numbers, see

  • 0

I just read an interesting article about php hanging on certain float numbers, see The Register and Exploring Binary.

I never explicitly use floats, I use number_format() to clean my input and display for example prices.

Also, as far as I am aware, all input from for example forms are strings until I tell them otherwise so I am supposing that this problem does not affect me.

Am I right, or do I need to check for example WordPress and Squirrelmail installations on my server to see if they cast anything to float? Or better, grep all php files on my servers for float?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:34:57+00:00Added an answer on May 19, 2026 at 2:34 am

    Ways to mitigate the problem:

    1. Use a modern CPU. Most modern 64-bit CPUs would be immune (I actually had trouble finding host that allows to reproduce it since they tend to use more modern hardware). Amazon VMs seem to be immune too.
    2. Upgrade your PHP version – 5.3.5 and 5.2.17 once released (probably today) include the fix.
    3. Build with -ffloat-store in CFLAGS (will slow down the code).
    4. Manually apply the patch to your code and rebuild PHP.

    Looking for the code that has float probably won’t help as zend_strtod is used by the engine in many string->number conversion scenarios.

    P.S. this code btw is standard BSD library strtod code, not unique to PHP. So other projects using this code might be affected too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just read this interesting article about the implementation details for various languages
I just read this interesting question about a random number generator that never generates
I've just read an interesting article about how Microsoft seems to be moving towards
I just read this rather interesting article, Copying Accelerated Video Decode Frame Buffers .
Just read this interesting article by Omar on his blog Linq to SQL solve
Just read an interesting article by yahoo's Nicholas C. Zakas: What’s a web browser?
I just read an article on www.songho.ca which indicates that a projection matrix is
I just read this great answer from BalusC about how to upload files with
I just read about the breadth-first search algorithm in the Introduction to Algorithms book
I just read about HTML 5's WebSocket interface. How can I start trying this?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.