Re: date() behaviour changed in 5.1?
| From: | Rasmus Lerdorf | Date: | Tue, 15 Nov 2005 17:29:29 +0000 |
| Subject: | Re: date() behaviour changed in 5.1? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20019@lists.php.net to get a copy of this message | ||
Pierre wrote:
On Tue, 15 Nov 2005 09:17:20 -0800 rasmus@lerdorf.com (Rasmus Lerdorf) wrote:I realize that, but Jani said "bad data" not data of the wrong type. Your example didn't have any bad data. You just had "100" which is a perfectly valid numeric string and will work in all cases. -RasmusPierre wrote:My answer was to Jani's.On Tue, 15 Nov 2005 18:59:32 +0200 (EET) sniper@iki.fi (Jani Taskinen) wrote:The question isn't what to do with "100","100" but what to do with "100abc","100abc". Should that still work? The old zend_get_parameters() following by a convert_to_long() says Yes. The newer zend_parse_parameters() says no.PHP is losely typed, I see nothing wrong to pass an integer as string there (for example, imagecreate("100", "100"); works).If you pass bad data to a function, it should not warn you? I'd rather have it as a FATAL error. :)Nothing to fix here, move along. (and fix your code..)