Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24198 invoked from network); 25 Aug 2011 12:39:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 12:39:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:59061] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/F3-00227-B92465E4 for ; Thu, 25 Aug 2011 08:39:56 -0400 Received: by bkd19 with SMTP id 19so1770930bkd.29 for ; Thu, 25 Aug 2011 05:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=mA9of0svRMd32jjqzFh2fqSmE0LLM+xS0TAIPtPZ1uw=; b=O44qZGNhfPHGxdxws2pDeiuYMi2RMRouoAN2RHd6UlLCOvhkIIRQcFrnDskbSTs2+T LvevYcopf+GAhP9q/wf9JpnQirKAJmoZ+czbQPKtP+OFO63kQJkJfTP5d07fHScSm8jz gH4wGiXLwjyZfnszjye+B/EWa3ya/EDorbxBA= MIME-Version: 1.0 Received: by 10.204.138.193 with SMTP id b1mr2896113bku.114.1314275992726; Thu, 25 Aug 2011 05:39:52 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.69.211 with HTTP; Thu, 25 Aug 2011 05:39:52 -0700 (PDT) In-Reply-To: <4E5619ED.40609@php.net> References: <4E5619ED.40609@php.net> Date: Thu, 25 Aug 2011 14:39:52 +0200 X-Google-Sender-Auth: PKnWrXGDpOAA8Bvll2oBC0zYqZw Message-ID: To: Sebastian Bergmann Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor() From: colder@php.net (Etienne Kneuss) Hi, On Thu, Aug 25, 2011 at 11:46, Sebastian Bergmann wrote= : > =C2=A0I have attached a patch to https://bugs.php.net/bug.php?id=3D55490 = that > =C2=A0implements ReflectionClass::newInstanceWithoutConstructor() to crea= te an > =C2=A0object a class without invoking the constructor. To me this feature makes no sense. But if people find use for it and it remains in Reflection, I won't object to it, so +0. > > =C2=A0As there are certain internal classes that would "crash" when their > =C2=A0constructor is not invoked, this new method of the Reflection API o= nly > =C2=A0works for userland-defined classes. I don't believe there should be this artificial distinction. Internal classes should behave like userland ones in every aspect, let's not put additional barriers. If an internal class can't behave well without a constructor call, that should already be fixed/prevented, as it's already possible by extending it. > > =C2=A0Unless there are objections, I will commit this change to PHP_5_4 a= nd > =C2=A0trunk on Monday. I will add the method to the documentation as well= , of > =C2=A0course. > > -- > Sebastian Bergmann =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Co-Founder and Principal Consultant > http://sebastian-bergmann.de/ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Etienne Kneuss http://www.colder.ch