Re: Disallow dynamic calls to assert()?
| From: | Tim Düsterhus | Date: | Sun, 11 May 2025 14:42:53 +0000 |
| Subject: | Re: Disallow dynamic calls to assert()? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127334@lists.php.net to get a copy of this message | ||
Hi
Am 2025-05-11 15:35, schrieb Gina P. Banyard:
This makes sense to me, I don't really see why one would ever need to call assert dynamically. Is it possible to prevent retrieving a closure by using the FCC syntax at compile time?There was some disagreement on the PR about whether or not dynamic calls should be disallowed, thus changing it would require an RFC, which I'm not planning to do (too much effort for something users are unlikely to run into in the first place). Thus also not investigating whether or not an implementation would need to look like. I'll merge the PR making dynamic
assert() a noop as a bugfix, though: https://github.com/php/php-src/pull/18521#issuecomment-2869905393
Best regards
Tim Düsterhus