strange PHP question
- Started
- Last post
- 3 Responses
- dc_again
this is really strange, but...
anyone have any weird results using ceil, floor or round? i won't detail my full script, suffice to say that at one stage i do a ceil function on a number. say this number is 4.3. as you would expect, on my local machine this produces 5. however, when i put it on a remote server, the same script produces 175084357678!!! the same thing, pretty much, happens when using round and floor as well. wtf?!?
anyone have any suggestions?
remote uses php 4.2.1. local uses 4.2.2. not that that should matter.
thanks in advance
- UndoUndo0
have you run phpinfo(); to check the environment??
if everything is okay i would strip out the section giving you a problem and test it in its own page
- dc_again0
i have, but i can't think what environment would cause simple php math functions to... malfunction!
- justjeff0
Is it literally '175084357678' ? That's an odd number ...
4.2.1 is very old - in fact, it's got a lot of bugs and security vulnerabilities. I would suggest that it's POSSIBLE it's a bug in PHP.
Also likely, if you're using a version of Zend that's not matched to the version of PHP, you can have very weird problems which may manifest themselves as overflows like you're seeing.