Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83033 invoked from network); 4 Nov 2008 22:03:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2008 22:03:38 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:52932] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/F3-15458-9B6C0194 for ; Tue, 04 Nov 2008 17:03:38 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 1F5724144058; Tue, 4 Nov 2008 22:04:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ci8tsUE6fVF3; Tue, 4 Nov 2008 23:04:22 +0100 (CET) Received: from [192.168.0.151] (77-58-151-147.dclient.hispeed.ch [77.58.151.147]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 2220E4144009; Tue, 4 Nov 2008 23:04:21 +0100 (CET) Cc: =?ISO-8859-1?Q?=22\=22Johannes_Schl=FCter\=22=22?= , "PHP Development" Message-ID: To: Kalle Sommer Nielsen In-Reply-To: <2dedb8a0810270026r6dc193cat55a66feda08c3485@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 4 Nov 2008 23:02:31 +0100 References: <2dedb8a0810260632k53529eafma4f760afaf4f5a8@mail.gmail.com> <1225031033.6991.5.camel@goldfinger.johannes.nop> <2dedb8a0810262216l38c08e8bub7604a64d6603805@mail.gmail.com> <0DB6F005-EC2D-4D51-8C56-5FCA6017611B@pooteeweet.org> <2dedb8a0810270026r6dc193cat55a66feda08c3485@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] Resource constants From: mls@pooteeweet.org (Lukas Kahwe Smith) On 27.10.2008, at 08:26, Kalle Sommer Nielsen wrote: > 2008/10/27 Lukas Kahwe Smith : >> >> On 27.10.2008, at 06:16, Kalle Sommer Nielsen wrote: >> >>> 2008/10/26 Johannes Schl=FCter : >>>> >>>> On Sun, 2008-10-26 at 14:32 +0100, Kalle Sommer Nielsen wrote: >>>>> >>>>> So, I propose its either being a "supported" feature, or simply =20= >>>>> put an >>>>> deprecation notice on it (5.3) and remove it HEAD. I personally =20= >>>>> vote >>>>> for the last option, as I don't think resources should be =20 >>>>> constants as >>>>> they do not have the constant value even though they do on some =20= >>>>> level. >>>> >>>> I recently discussed the same issue on IRC, (due to #45982) we =20 >>>> can't get >>>> rid of resources in constants completely as we need that for STDIN, >>>> STDOU, STDERR constants. >>> >>> Yes I know, but still I think we should either making it a supported >>> feature or restrict registering resources on define(). >> >> >> Huh, I wasnt even aware that define() supports anything but scalar =20= >> values. >> At any rate I am very sure I never stumbled over code defining a =20 >> constant >> with a ressource. Not a very good idea to support ressources, =20 >> especially >> given the obvious WTF's this causes (as you rightly pointed out). =20 >> So I see >> that an E_DEPRECATED would make sense. However I am not sure about =20= >> removing >> this though, which would make the E_DEPRECATED a bit odd (why =20 >> deprecate if >> we do not remove?). > > E_DEPRECATED if we deprecated this feature, but I would be happy with > an E_STRICT if this behaviour will be kept. :) >> so lets mark it as E_DEPRECATED in 5.3 and remove in 6.0, given that =20 its currently not documented (though oddly it still discourages users =20= to not do something that is not said to work "Only scalar data =20 (boolean, integer, float and string) can be contained in constants. Do =20= not define resource constants.") regards, Lukas Kahwe Smith mls@pooteeweet.org