On Mon, Apr 30, 2012 at 9:50 AM, Patrick ALLAERT <patrickalla...@php.net> wrote: > Hi, > > 2012/4/12 Nikita Popov <nikita....@googlemail.com>: >> PS: I added isset() too, to address the consistency concerns mentioned on >> IRC. > > I would have voted +1 if it didn't contain the isset() change. None of > the examples used in the isset_with_expr.phpt test seems logic to me. > > Care to explain the consistency concerns here? The concerns came from laruence, so maybe he could drop a comment here :) Basically, empty() and isset() are very similar in their nature, so changing only one of them might seem inconsistent.
Personally I don't see much use in allowing expressions in isset(). People being confused by empty(trim($_GET['foo'])) not working is quite common, but I've never heard of somebody trying to use isset() on a function call. The name already makes clear that it's intended for use on variables. So, I'm not quite sure what I'm supposed to do about this. Should I add two vote options, one for empty() only, one for both? Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php