ALERT - heap overflow or double efree detected и большие числа в PHP
if ($a1 & $a2)
echo 1;
else
echo 0;
все получается замечательно, но разделов 65 и php вылетает с ошибкой ALERT - canary mismatch on efree() - heap overflow or double efree detected
Как решить данную проблему ума не приложу. Есть у кого то идеи?
http://www.php.net/manual/en/language.types.integer.php
А там пишут:
Цитата:
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). 64-bits platforms usually have the maximum value of about 9E18. PHP does not support unsigned integers.
Что в вольном переводе на русский означает, что для int'а максимальное значение равно 2 в степени 32 минус 1.
Но там пишут дальше:
Цитата:
If PHP encounters a number beyond the bounds of the integer type, it will be interpreted as a float instead.
Что в вольном переводе на русский означает - юзайте тип float
http://ru2.php.net/manual/en/function.floatval.php
Далее читаем про float:
Цитата:
The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format).
Соответственно для float используется 64 бита. Если вам нужно больше 64 бит - то тут РНР вам уже не поможет - с типизацией там всегда была бооольшая беда. Значит разделяйте на несколько интов или флоатов, либо ищите иные способы задания прав пользователям (строки, массивы, объекты и т.д.)