I am looking to create a system which on signup will create a subdomain on my website for the users account area.
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
I need to store a huge number in a PHP variable (it's for a programming contest if you're wondering why). However, if the number is too big, it gets displayed as 6.2995416979471E+77
. Is there a way to store that huge number in PHP?
integers have a limited size of 32 or 64bit, depending on your architecture.
ReplyDeletefloats can store values of any size, but are imprecise.
If you want to work with giant, precise numbers, use strings and the BC Math extension.
$bigNumber = 1234567890; // etc
ReplyDeleteecho number_format($bigNumber, 0);
Have you tried PHP's BCMath arbitrary precision functions? They use strings to represent numbers.
ReplyDelete