PHP 5.2, 5.3 版本的浮點數 Bug

PHP 5.2 和 5.3 版, 在 32bits 的 PHP 會有浮點數的 Bug.

看測試程式, 應該是在 (double)"2.2250738585072011e-308" 這計算過程, 會讓程式一直跑個不停, 造成機器掛掉. (純猜測, 我不敢測試. XD)

相關新聞

測試程式

此程式執行, 若有此 Bug, 會出現下述錯誤訊息:

Testing float behaviour. If this script hangs or terminates with an error message due to maximum execution time limit being reached, you should update your PHP installation asap!
For more information refer to <http://bugs.php.net/53632>.
PHP Fatal error:  Maximum execution time of 1 second exceeded in - on line 35

Fatal error: Maximum execution time of 1 second exceeded in - on line 35

機器正常, 沒有問題:

Testing float behaviour. If this script hangs or terminates with an error message due to maximum execution time limit being reached, you should update your PHP installation asap!
For more information refer to <http://bugs.php.net/53632>.
Your system seems to be safe.


關於 Tsung

對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
本篇發表於 My_Note-Unix。將永久鏈結加入書籤。

發表迴響