|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-25 11:48 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
Description: ------------ There is a problem out there that states that if you take a number and keep dividing it by half you should never reach zero. But apparently in PHP that is not the case.. Reproduce code: --------------- <?php $number = 50; echo "Starting Number: $number<br>"; while($number > 0){ $number = $number / 2; echo "Number: $number<br>"; } ?> Expected result: ---------------- It should just go on for a ridiculous amount of time until it memory leaks... Actual result: -------------- It ends up at 0.