Re: [PHP-DEV] __isset() and null value

2020-09-04 Thread Michael Voříšek - ČVUT FEL
Yes, this is purely to offer native/php support for it. When implementing custom ORM etc., we do not have any control over the class, ie. extra method for checking property existance is not possible. With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem, Michael Voříšek, studen

Re: [PHP-DEV] __isset() and null value

2020-09-04 Thread David Rodrigues
Maybe you just can implements your own method to check? Like your exists() example. Em sex, 4 de set de 2020 15:08, Michael Voříšek - ČVUT FEL < voris...@fel.cvut.cz> escreveu: > Your examples provide code for checking the existance of real > properties. But how to check existance of a magic one?

Re: [PHP-DEV] __isset() and null value

2020-09-04 Thread Michael Voříšek - ČVUT FEL
Your examples provide code for checking the existance of real properties. But how to check existance of a magic one? The best is currently __isset(), but to comply with isset() definition, it should not return true when the magic property has null value, thus I belive, there is currently not wa

Re: [PHP-DEV] __isset() and null value

2020-09-04 Thread Marco Pivetta
Heya, On Fri, Sep 4, 2020 at 7:03 PM Michael Voříšek - ČVUT FEL < voris...@fel.cvut.cz> wrote: > isset() returns false for null > > __isset() should return the same, but then if magic property with null > value exists, there is no way to detect it > > Example: http

[PHP-DEV] __isset() and null value

2020-09-04 Thread Michael Voříšek - ČVUT FEL
isset() returns false for null __isset() should return the same, but then if magic property with null value exists, there is no way to detect it Example: https://3v4l.org/GqUsh this is currently an limitation of php Ideally, we should introduce __exist() which should return true even if v

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-04 Thread Sara Golemon
On Thu, Sep 3, 2020 at 8:23 PM Levi Morrison wrote: > > 3. Better visibility from the JIT (not having to cross > userspace/internals > > border is good) > > This is a good point _in theory_, but to me this is just indicative > that we need to be able to bundle built-in functions for php-src. Now

Re: [PHP-DEV] Use PSR coding guidelines in php.net docs (instead of PEAR-CS)

2020-09-04 Thread G. P. B.
On Fri, 4 Sep 2020 at 15:50, Tymoteusz Motylewski wrote: > Hi, > Right now (as stated here: http://doc.php.net/tutorial/style.php) the code > style used in PHP documentation is PEAR-CS > https://pear.php.net/manual/en/coding-standards.php > > The problem is that: > - PEAR-CS does not cover new PH

[PHP-DEV] Use PSR coding guidelines in php.net docs (instead of PEAR-CS)

2020-09-04 Thread Tymoteusz Motylewski
Hi, Right now (as stated here: http://doc.php.net/tutorial/style.php) the code style used in PHP documentation is PEAR-CS https://pear.php.net/manual/en/coding-standards.php The problem is that: - PEAR-CS does not cover new PHP versions (e.g. namespaces are missing) - it has a very little adoption