Hi! > Currently the empty() language construct only works on variables. You > can write if (empty($array)) but not empty if (empty(getSomeArray()). > > The original reason for this restriction probably is that - in a way - > it "doesn't make sense" to pass anything but a variable to empty() as > you could just use the ! operator in this case. if > (empty(getSomeArray())) is logically equivalent to if > (!getSomeArray()).
Don't see any problem with that, looks good. Please add some tests (including function calls and some expressions) and make a pull request. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php