//This $foo = (integer) ifsetor($_POST['foo'], 0);
//Instead of $foo = (integer) (isset($_POST['foo']) ? $_POST['foo'] : 0);
It was also to be useful for accessing array elements that may or may not be there.
I strongly agree with Ramsus that ?: is far to close to the ternary operator and would prove to be *highly* confusing to beginners.
Marcus made an excellent point about the 2 versions of the function: 1) $a = ifsetor($b) 2) $a = ifsetor($b, NULL)
By the way, I'm not stuck on ifsetor() as a name, but a) the name should be short and clear b) the construct must be called with function like syntax
Marc,
I must ask, why are you so opposed to the function() syntax? There has been quite a few reasons stated against the operator syntax, but I haven't heard any reason why we should not go with the function() syntax?
Sincerely, Jason Garber
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php