Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69406 invoked from network); 18 Jan 2015 08:42:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2015 08:42:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:55685] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/A8-18613-FE17BB45 for ; Sun, 18 Jan 2015 03:42:24 -0500 Received: (qmail 22732 invoked from network); 18 Jan 2015 08:42:20 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 18 Jan 2015 08:42:20 -0000 Message-ID: <54BB71E2.8040809@beccati.com> Date: Sun, 18 Jan 2015 09:42:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Sebastian Bergmann , internals@lists.php.net References: <54BB6F75.8090609@php.net> In-Reply-To: <54BB6F75.8090609@php.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Class constructor behaviour From: php@beccati.com (Matteo Beccati) Hi, On 18/01/2015 09:31, Sebastian Bergmann wrote: >> 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. +1 here as well. Sounds like material for a new RFC. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/