Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31698 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11868 invoked by uid 1010); 17 Aug 2007 16:50:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11846 invoked from network); 17 Aug 2007 16:50:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2007 16:50:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@smashlabs.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@smashlabs.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain smashlabs.com from 67.15.58.61 cause and error) X-PHP-List-Original-Sender: ralph@smashlabs.com X-Host-Fingerprint: 67.15.58.61 openrce.org Received: from [67.15.58.61] ([67.15.58.61:57295] helo=SMASHER.SMASHlabs.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/99-49531-1C1D5C64 for ; Fri, 17 Aug 2007 12:50:11 -0400 Received: (qmail 21044 invoked from network); 17 Aug 2007 11:50:04 -0500 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 17 Aug 2007 11:50:04 -0500 Message-ID: <46C5D1BB.8040007@smashlabs.com> Date: Fri, 17 Aug 2007 11:50:03 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: David Coallier CC: Marcus Boerger , Lukas Kahwe Smith , PHP Developers Mailing List References: <46C30190.2060106@pooteeweet.org> <1222090294.20070816222340@marcus-boerger.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] reserved word alert From: ralph@smashlabs.com (Ralph Schindler) Hey David & Lucas, I brought this up a year ago on the list here: http://marc.info/?t=114728193700003&r=1&w=2 Essentially, the trend will continue to be that as keyword requiring features are added, the global naming space will continue to become smaller and less safe for older applications written for older versions of php. Until it becomes a goal of php-internals to add contextual awareness and sensitivity to the compiler's tokenizer, this will always be a problem. Here is a more amusing list of method names that will also not work: http://marc.info/?l=php-dev&m=114736739115429&w=2 And the general opinion summed up by Wez ;) http://marc.info/?l=php-dev&m=114764099400409&w=2 -ralph David Coallier wrote: > On 8/16/07, Marcus Boerger wrote: >> Hello Lukas, >> >> this is a no issue. Prefix your code and be done! >> > > That means prefixing your methods as well ? > > The problem is when one calls something like a method "import()" > > You prefix your functions ? I think this is silly. Prefix the class to > make it namespace** like, but not the methods... > > PEAR_ClassName { > public static function __PEAR_construct() { } > public static function PEAR_import() { } > public static function PEAR_export() { } > } > > Which ends in > > PEAR_ClassName::PEAR_Import(); > > Whereas: > > PEAR_ClassName::import(); would usually be ok to do. > > Prefixing the methods imho is the no go in this case. >> marcus >> >> Wednesday, August 15, 2007, 3:37:20 PM, you wrote: >> >>> Hi, >>> Someone in the Doctrine channel just brought up the issue of having to >>> look forward to ensure mid term compatibility when choosing names for >>> identifiers. I guess with namespaces and other things will add new >>> reserved words. I think we should have a prominent place on php.net with >>> early warning for reserved words that will be in future php releases. >>> regards, >>> Lukas >> >> >> >> Best regards, >> Marcus >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >