Re: PHP 7.1 - Address PHPSadness #28?
| From: | Rowan Collins | Date: | Fri, 18 Sep 2015 13:59:47 +0000 |
| Subject: | Re: PHP 7.1 - Address PHPSadness #28? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88322@lists.php.net to get a copy of this message | ||
Stig Bakken wrote on 18/09/2015 14:44:
What lesson can we learn from that? Short and sweet names sometimes lead to problems, if they do not precisely convey the actual semantics. I would much rather see a function called something like is_variable_defined(), to avoid running into the same trap with exists(). No room for assumptions that lead you to not check the docs.I agree 100% with this. If we do add a new function, which I'm still not entirely convinced of the need for, we should be very explicit about what it does, and very careful in naming it. Regards, -- Rowan Collins [IMSoP]