|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-16 22:26 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 19:00:02 2025 UTC |
Description: ------------ It would be nice if empty() would accept multiple arguments like isset() does. It would be functionally equivalent to: empty(var) || empty(var2) ... || empty(varN) Reproduce code: --------------- <?php $a = 1; if (empty($a, $b, $c)) { echo 'Either $a, $b or $c was empty/did not exist.'; } ?> Expected result: ---------------- Either $a, $b or $c was empty/did not exist. Actual result: -------------- parse error, unexpected ',', expecting ')' in /.../file.php on line 3