Re: empty list removed
| From: | Karoly Negyesi | Date: | Mon, 05 Jul 2021 09:37:28 +0000 |
| Subject: | Re: empty list removed | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969387965@lists.php.net to get a copy of this message | ||
Hrm. Now I see your link but...
https://i.imgur.com/43heo5B.png
In "A variable is considered empty if it does not exist or if its value
equals false" what about changing the words "equals false" to link to the
page you mentioned?
Also can we link from https://www.php.net/manual/en/types.comparisons.php
to the boolean page somewhere?
Thanks
Karoly Negyesi
On Mon, Jul 5, 2021 at 2:08 AM Christoph M. Becker <cmbecker69@gmx.de>
wrote:
> Hi!
>
> On 05.07.2021 at 08:48, Karoly Negyesi wrote:
>
> > 3ae0b14dd0 removed the list of empty things.
> >
> > The documentation now says "A variable is considered empty if it does not
> > exist or if its value equals false." Great, and which values do that?
> >
> > The commit message says: "To avoid duplication, we refer to falsey values
> > instead."
> >
> > If this is a duplicate, we need to link to the list where it exists. If
> it
> > is only a duplicate of scattered information all around and the list
> > doesn't exist anywhere, this commit needs to be reverted and "SimpleXML
> > objects from empty tags" added to the list. I would vastly prefer this
> one
> > but I am not here to start an edit war. Let's discuss first :)
>
> The documentation (<https://www.php.net/empty>) states:
>
> | Returns false if var exists and has a non-empty, non-zero value, aka
> | falsey, see conversion to boolean. Otherwise returns true.
>
> "Conversion to boolean" links to
> <
>
> https://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting
> >,
> and there is a list of values which are consired falsey, including
> SimpleXMLElements.
>
> Are we looking at different PHP manuals?
>
> > Also, if those objects are worth a special case then
> > https://www.php.net/manual/en/types.comparisons.php needs
> > to be fixed
> too.
> > And yes you can -- kind of -- glean the list of empty things from this
> page
> > but it's a big mental effort.
>
> Might be worth to add SimpleXMLElements there; OTOH, *any* internal
> object could behave special in this regard.
>
> Christoph
>