Re: Return type hints

From: Date: Wed, 13 Sep 2006 14:50:39 +0000
Subject: Re: Return type hints
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-25662@lists.php.net to get a copy of this message
Terje Slettebø wrote:
I'd say that's debatable. :) Yes, it can make it more convenient to handle data coming from outside the script (such as forms), but it can also hide bugs. While it can be argued that conversions between, say, arithmetic types (int and floats) may be useful, allowing conversion from something like NULL to empty string, integer 0, etc. (as PHP does) may be going a little over board, as an uninitialised variable (such as a member variable) may not be easily discovered.
IMHO, that is covered by === and the NOTICE error level. -- Brian Moon ------------- http://dealnews.com/ Its good to be cheap =)

« previous php.internals (#25662) next »