|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-17 21:11 UTC] yohgaki@php.net
[2002-10-08 21:48 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 19:00:02 2025 UTC |
All the following lines output an integer value (6) instead of a float one (6.9): echo 5.2+1.7; echo (float)5.2+(float)1.7; printf("%2.2f",(float)5.2+1.7); echo sprintf("%2.2f",(float)5.2+1.7); ... same thing with "*" operator: echo (float)60*0.7; returns 0 php 4.2.1 (ftp+gd+ctype+bcmath+zlib) Apache 1.3.26