On 22 Oct 2008, at 19:37, ceo@xxxxxxxxx wrote:
I think we need a new error reporting constant E_STUPID.
This should catch stupid things I do like trying to embed an array
into a string such as:
$foo = array('a', 'b', 'c');
$query = "select * from foo where foo in ('$foo')";
It's been one of those days...
I've had a great day, but then I'm on leave this week ;)
I don't think you're far wrong with this one. I really think trying to
use an array as a string should raise a warning. It's easily done and
having it spit out "Array" is less than helpful. I think the same
should be true of resources except that you should be able to force a
resource to a string with an explicit cast. Loose typing is great but
there are some conversions that never really make sense.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php