Sorry, Olli, if that kind of ignores your statements, but I would like not to distract from the issue. IIRC, what you suggested is called "boxing" in C# and would lead too far here.
I wanted to focus only on the "return new ..." case and only on PHP4, as "return new" is a very special case. This particular construct is really unambiguous and the workaround on the PHP language level is really nonsense. As to the notices, I will gladly accept them and take them as a helpful pointers when "fixing" my "broken" code. The problem is that this particular case causes a lot of "white noise" notices (at least in heavily OO apps), as IMHO "return new" is not something that needs to be fixed by me. I have been strolling around in a lot of places where the changed behaviour is being discussed, but I haven't seen a sound rationale for *this particular* case yet. Kind regards, Matthias -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php