חבל שאנשים לא אוהבים לבדוק במדריך הרישמי אף פעם
ציטוט:
נכתב במקור על ידי PHP.net
The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). PHP does not support unsigned integers. Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX since PHP 4.4.0 and PHP 5.0.5.
|
ציטוט:
נכתב במקור על ידי PHP.net
Integer overflow
If PHP encounters a number beyond the bounds of the integer type, it will be interpreted as a float instead. Also, an operation which results in a number beyond the bounds of the integer type will return a float instead.
|
עוד משהו שרציתי לומר בקשר למה שבניה אמר
ציטוט:
נכתב במקור על ידי בניה
גודל הinteger בPHP הוא מוגבל,אפשר להשתמש בMYSQL במקום.
ככה למשל:
SELECT 1+1
|
אולי שכחת אבל גם לmySQL יש הגבלות (שים לב שערך ברירת המחדל הוא signed)
http://dev.mysql.com/doc/refman/5.0/...ric-types.html
לדעתי אם אתה באמת צריך להשתמש במספרים כל כך גדולים תכתוב patch בc לליבה (core) של PHP ותקצה תחום רחב יותר מdouble-word לinteger (מה שכמו שאמרתי אפשר לעשות דרך הphp.ini) אבל זה כמובן יוריד את היעילות שכן אין צורך לתאי זיכרון גדולים כל כך לרוב המספרים ולכן לדעתי ליצור סוג נוסף של משתנה מספרי הוא הפתרון האידאלי לבעיה שלך
מקווה שעזרתי,
כפיר