float?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

float?

Post by shiznatix »

what is a "float"? sorry if this is a dumb question but i came across this term and searched google to no avail...maybe im the dumb one...or maybe im having a early monday?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

some usefull information
integer wrote:If you specify a number beyond the bounds of the integer type, it will be interpreted as a float instead. Also, if you perform an operation that results in a number beyond the bounds of the integer type, a float will be returned instead.
Also take a look over at http://ca3.php.net/manual/en/language.types.float.php
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

ok so its like a number that isnt a "solid" number per say? do i have the right idea after reading this?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I just found a more in depth explaination of floats

http://www.randelshofer.ch/fhw/gri/float.html
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Hmmm http://docs.php.net/en/language.types.html

Although they describe Float as the same as Double, but in C++, they are different. But basically a float is a decimaled integer or real number.
Post Reply