Re: changing NULL behavior in PHP arithmetic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> because arithmetic operations with "Unknown" operands should result to "Unknown" ...
in PHP "Unknown" values are represented by NaN, not NULL
http://php.net/manual/en/function.is-nan.php

but what surprises me is
is_nan(6/0) = (bool)false (along with a warning)

>> Now PHP uses NULL as a 0 (zero) for arithmetic
I dont expect anything different, because intval(null) is 0.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux