> But I just wanted to point out that this is something the author
> (and I) would never expect to happen ...

> in_array("123abc", array(3, 7, 123, 28)) === true

Well, would you never expect

    select ( '123abc' in (3,7,123,28) )

to return boolean true in SQL?

Because it does.

Me, I'm happy with the parity of these two languages that so often
must work in tandem. YMMV but I don't see anything kooky. As Adam &
others have pointed out, the author of that blog post used the
original input as-is. Akin to passing a var into a sanitization
function (by value), getting a return true, and continuing processing
w/the initial var. I'm not saying I haven't done plenty of similarly
stupid things, but I don't see them as evidence to be entered against,
well, anything except my own incompetence.

-- S.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to