Re: [PHP] changing NULL behavior in PHP arithmetic

2010-04-15 Thread Ashley Sheridan
On Thu, 2010-04-15 at 09:46 +0200, cr.vege...@gmail.com wrote: Hi All, Is there an option in PHP to change the behavior of NULL in PHP functions ? Now PHP uses NULL as a 0 (zero) for arithmetic, for example: NULL + 6 = 6 NULL * 6 = 0 NULL / 6 = 0 6 / NULL = Division by zero What I

Re: [PHP] changing NULL behavior in PHP arithmetic

2010-04-15 Thread kranthi
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

Re: [PHP] changing NULL behavior in PHP arithmetic

2010-04-15 Thread cr.vegelin
From: Ashley Sheridan To: cr.vege...@gmail.com Cc: php-general@lists.php.net Sent: Thursday, April 15, 2010 10:08 AM Subject: Re: [PHP] changing NULL behavior in PHP arithmetic On Thu, 2010-04-15 at 09:46 +0200, cr.vege...@gmail.com wrote: Hi All, Is there an option in PHP