Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43301 invoked by uid 1010); 2 Mar 2007 20:22:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43286 invoked from network); 2 Mar 2007 20:22:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2007 20:22:46 -0000 X-Host-Fingerprint: 193.171.131.245 teacheradsl245.eduhi.at Received: from [193.171.131.245] ([193.171.131.245:2983] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/A3-04700-59788E54 for ; Fri, 02 Mar 2007 15:22:46 -0500 Message-ID: To: internals@lists.php.net Date: Fri, 02 Mar 2007 21:24:17 +0100 User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 References: <4B.08.04700.2DB68E54@pb1.pair.com> <45E87EA0.8020602@gmail.com> In-Reply-To: <45E87EA0.8020602@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 193.171.131.245 Subject: Re: [PHP-DEV] Constant Parameters From: jakob.buchgraber@gmail.com (Jakob Buchgraber) Marco Kaiser wrote: > Hi Jakob, >> It would be nice if in PHP 6 using constant parameters for functions >> and methods would be possible. This feature is e.g. available in Java. >> >> function doSth (const A) { >> if (defined ("A")) echo "A is a constant"; >> } >> >> doSth ("foo"); >> >> Cheers, >> Jay >> > This makes absolute no sense, why you want this? > > -- Marco It's just a way of ensuring that a parameter cannot be changed within a method (e.g. an id). I am using this feature frequently in Java. It actually got no "deeper" sense, but it's just a nice feature I'd like to use in PHP too. :-) Cheers, Jay