Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44663 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70793 invoked from network); 2 Jul 2009 15:07:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2009 15:07:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.206 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.218.206 mail-bw0-f206.google.com Received: from [209.85.218.206] ([209.85.218.206:63337] helo=mail-bw0-f206.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/50-03575-B3DCC4A4 for ; Thu, 02 Jul 2009 11:07:40 -0400 Received: by bwz2 with SMTP id 2so1155578bwz.23 for ; Thu, 02 Jul 2009 08:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=wbqmEYyFr7ccl/BE0l2466SoUT3Ykd64kER9bo9ng7g=; b=up1N8zN8vCKbHCUQYIO9K8oyB+XfSt1rSi6UxaTU8S4w82W0ECU5DiWJN538LM+3WE w0WFJfljE8d5gyJx9ajS+kmiw5gCxFFApbbVJjnbE5mhCjp7/6E0XTbIoMqbaRRXpMim H63cbpsQzV9f4q73CAbJ8jKz+/ITgP5hcdleo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=UOVU6qVs4Xlw4sOGw3KBHg1FMAqw16bwxmIa6Cw3h1mCToHIH4/4YaLxe5EyQ/h0+a b7QOVuvljODeNFaw5d4iQEFalDc02wAFL0yviPdLP3iACra91pnwKFVleQ/kkOoVHkV5 neogZt3gxn8b3bc7onfx2PmFMkHbR0oGBrgwA= MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.204.57.18 with SMTP id a18mr151413bkh.19.1246547256637; Thu, 02 Jul 2009 08:07:36 -0700 (PDT) In-Reply-To: <98b8086f0907020755k1c29930n8a4cef38dbb61291@mail.gmail.com> References: <98b8086f0907020714m6c67fce3jab4d13429b3cd2a4@mail.gmail.com> <1246545959-sup-2910@javelin> <98b8086f0907020755k1c29930n8a4cef38dbb61291@mail.gmail.com> Date: Thu, 2 Jul 2009 17:07:36 +0200 X-Google-Sender-Auth: 6996c505d2863c28 Message-ID: <2dedb8a0907020807t4d69189anb9d0550d5f141770@mail.gmail.com> To: troels knak-nielsen Cc: internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] constructors are callable as regular functions. From: kalle@php.net (Kalle Sommer Nielsen) 2009/7/2 troels knak-nielsen : > [snip] ... - I don't remember ever > seen __construct() called directly. Its commonly done when extending reflection for example, or to populate the Exception class constructor when extending it: code = (integer) $code; parent::__construct($message); } } ?> Or more complex constructors without having to re-implement their logic / handling of constructing the object. -- regrads, Kalle Sommer Nielsen kalle@php.net