summaryrefslogtreecommitdiff
path: root/ext/intl/breakiterator/breakiterator_methods.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-04-12 11:54:52 +0200
committerNikita Popov <nikic@php.net>2012-05-13 14:56:51 +0200
commitec061a93c53c8cde10237741e98e992c1a05d148 (patch)
tree443c1b193db39a901d5540543bcbaa012ef76c8c /ext/intl/breakiterator/breakiterator_methods.cpp
parent5852e5f48d7b013108b98b9c57c18383765d21ea (diff)
downloadphp-git-ec061a93c53c8cde10237741e98e992c1a05d148.tar.gz
Allow arbitrary expressions for empty()
This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs. The change allows passing the result of function calls and other expressions to the empty() language construct. This is accomplished by simply rewriting empty(expr) to !expr. The change does not affect the suppression of errors when using empty() on variables. empty($undefinedVar) will continue not to throw errors. When an expression is used inside empty() on the other hand, errors will not be suppressed. Thus empty($undefinedVar + $somethingElse) *will* throw a notice. The change also does not make empty() into a real function, so using 'empty' as a callback is still not possible. In addition to the empty() changes the commit adds nicer error messages when isset() is used on function call results or other expressions.
Diffstat (limited to 'ext/intl/breakiterator/breakiterator_methods.cpp')
0 files changed, 0 insertions, 0 deletions