Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35134 invoked from network); 27 Feb 2012 19:18:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2012 19:18:54 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:59303] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/31-29394-D17DB4F4 for ; Mon, 27 Feb 2012 14:18:54 -0500 Received: from [192.168.2.230] (ppp-93-104-28-210.dynamic.mnet-online.de [93.104.28.210]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 21830601E3; Mon, 27 Feb 2012 20:09:09 +0100 (CET) To: Richard Lynch Cc: "internals@lists.php.net" In-Reply-To: <2b2726ae802163c88909a8e4e161d246.squirrel@www.l-i-e.com> References: <41055a3dd36db02d3d09012231787a8d.squirrel@www.l-i-e.com> <4F4BB316.6080600@gmail.com> <2b2726ae802163c88909a8e4e161d246.squirrel@www.l-i-e.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 27 Feb 2012 20:09:08 +0100 Message-ID: <1330369748.2159.49.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Scalar type hinting From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Mon, 2012-02-27 at 13:05 -0600, Richard Lynch wrote: > > I'd have to come up with some OTHER scenario not involving fatal > error, such as: > > strict $db = new DB(); The example is wrong. The new operator will always return an instance of the given class (or there will be an exception). Use strict $db = DB::factory(); for your example instead. johannes