Re: Class constructor behaviour
| From: | Matteo Beccati | Date: | Sun, 18 Jan 2015 08:42:10 +0000 |
| Subject: | Re: Class constructor behaviour | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80731@lists.php.net to get a copy of this message | ||
Hi,
On 18/01/2015 09:31, Sebastian Bergmann wrote:
+1 here as well. Sounds like material for a new RFC. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/Several classes in PHP return null when there is a problem in the parameters passed to their constructor e.g. [...] Several constructors check the parameters that they are given.....and then just give a warning when they are not acceptable. e.g. [...] Some constructors check the parameters they are given, and then emit either a 'Catchable fatal error' error or other error e.g.Classes implemented in C / provided by PHP must not have any of the above issues. +1 for fixing them.