On Mon, Oct 30, 2023 at 1:24 PM Alessandro Rosa <alessandro.a.r...@gmail.com> wrote:
> Hi, > > I have posted a new RFC at this link > https://wiki.php.net/rfc/empty_function > where I suggested some improvements to the standard built-in empty() > function and provided a number of examples. > > Thanks, > > Alessandro Rosa > WEB : http://alessandrorosa.altervista.org > LINKEDIN : https://www.linkedin.com/in/alessandro-rosa-9b7ba67b/ If anything I'd rather see `empty()` disappear, but I'll settle with a warning to be cautious when using it. We don't need a replacement as you should create your own function to validate what you consider "empty" or not based on the given context and variable type. For me `(bool) false or "(int) 0" isn't empty either, it's still a value of sorts.