Re: PHP 7.1 - Address PHPSadness #28?
| From: | Rowan Collins | Date: | Wed, 23 Sep 2015 16:35:37 +0000 |
| Subject: | Re: PHP 7.1 - Address PHPSadness #28? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88443@lists.php.net to get a copy of this message | ||
Lester Caine wrote on 23/09/2015 13:22:
NOW WE AGREE ;) Simply because I DON'T want call 'isset() and is_null()' what*I* need is is_exist() which is the missing function. THEN either of the other is redundant, but neither replaces the check that the variable actually exists and it's that which prevents a clean program flow.Absolutely. To be clear, my position is no longer that you are "wrong" to want this function, only that your need for it is unusual, and not what most people are looking for when they use isset(). That's why I propose a function of "variable_exists(string $variable_name): boolean" for those cases where code is working with dynamic variable names, in the same way as function_exists() and class_exists() support working with dynamic definitions and autoloading.
If you read more rows YES they will have the same set of columns but there is nothing demanding that every column in the database is actually returned in every query? Only returning the subset needed for the job is perfectly sensible and there are a number of ways that can happenOK, that makes sense. Regards, -- Rowan Collins [IMSoP]