Re: date() behaviour changed in 5.1?

From: Date: Wed, 16 Nov 2005 08:41:19 +0000
Subject: Re: date() behaviour changed in 5.1?
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-20056@lists.php.net to get a copy of this message
Jani Taskinen wrote:
On Tue, 15 Nov 2005, Rasmus Lerdorf wrote:
Derick Rethans wrote:
On Tue, 15 Nov 2005, Andrei Zmievski wrote:
Perhaps, but I would maintain that passing "123abc" and having it interpreted as 123 is still wrong.
Yeah, I lean that way too, although trailing whitespace should be supported IMO.
I don't like having two different ways to cast things and I think we would break a lot of stuff if (int)"123abc" no longer resulted in 123.
    What has casting and passing a parameter have to do with each other anyway?
    IMO, they're totally different things.
How is it not related? A function defined to take an int is passed "123" and it magically works. Or a function defined to take a string is passed 123 and that also magically works. How do you describe that other than through casting? Do you really want to document a different set of "function parameter type conversion rules" that have nothing to do with, and are completely different from casting? -Rasmus

« previous php.internals (#20056) next »