|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-12 13:23 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
<?php $test="2.03"; $amount=($test*100); echo $amount . "\n"; printf("%06d\n",$amount); $amount=(2.03*100); printf("%06d\n",$amount); ?> Produces the following output: 203 000202 000202 My math is a little fuzzy but I think 2.03 * 100 = 203. This used to work in php 3.x but seems to be broken since the 4.x beta.