Re: phpsadness

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

 



Well the argument has both sides. Division by zero on many platforms resulted in zero. Then came IBM360 and it generated an exception causing big time issues in legacy code so a OS patch was written to intercept the interrupt, jam the result to zero and return.

Although mathematically undefined is correct, in most programtic cases zero is an acceptable and in fact a preferred result.

(sorry for the top posting)

Sent from my iPad

On May 28, 2011, at 5:33 AM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:

> On 11-05-28 05:26 AM, Andre Polykanine wrote:
>> Hello Lester,
>> 
>> Actually,  many of the points are not important for me so far, however
>> this one really drives me mad:
>> http://phpsadness.com/?page=sad/35   (can't   explode()  by  an  empty
>> string)
>> Besides that, he says nothing about unicode issues.
>> I  love  PHP  (I  really do, it's a neat language, as for me!), but it
>> *should* be unicode by default. If you ever read my code when I try to
>> make and strtr() with a unicode string, you'll understand me because I
>> do  an iconv(), then strtr() and then an iconv() back to unicode. That
>> is not a good coding practice, is it?
> 
> Isn't explode() with an empty string akin to division by zero?
> 
> Cheers,
> Rob.
> -- 
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
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