Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80729 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66410 invoked from network); 18 Jan 2015 08:31:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2015 08:31:55 -0000 Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.237 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.237 mail-1.de-punkt.de Received: from [93.190.64.237] ([93.190.64.237:43924] helo=mail-1.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/F7-18613-97F6BB45 for ; Sun, 18 Jan 2015 03:31:54 -0500 Received: from localhost (localhost [127.0.0.1]) by mail-1.de-punkt.de (Postfix) with ESMTP id 0310B3A26F for ; Sun, 18 Jan 2015 09:31:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail-1.de-punkt.de Received: from mail-1.de-punkt.de ([127.0.0.1]) by localhost (mail-1.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gy9-C0EvnXhJ for ; Sun, 18 Jan 2015 09:31:49 +0100 (CET) Received: from [192.168.178.24] (p4FC7CCD7.dip0.t-ipconnect.de [79.199.204.215]) (Authenticated sender: php@sebastian-bergmann.de) by mail-1.de-punkt.de (Postfix) with ESMTPSA id A1AB03A265 for ; Sun, 18 Jan 2015 09:31:49 +0100 (CET) Message-ID: <54BB6F75.8090609@php.net> Date: Sun, 18 Jan 2015 09:31:49 +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: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Class constructor behaviour From: sebastian@php.net (Sebastian Bergmann) Am 17.01.2015 um 15:02 schrieb Dan Ackroyd: > class constructors PHP does not have class constructors (static method automatically invoked when a class is initialized). It only supports object constructors (method automatically invoked when an object is created). > 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.