Re: Constant Parameters
| From: | Jakob Buchgraber | Date: | Fri, 02 Mar 2007 20:24:17 +0000 |
| Subject: | Re: Constant Parameters | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28206@lists.php.net to get a copy of this message | ||
Marco Kaiser wrote:
Hi Jakob,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, JayIt 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) {This makes absolute no sense, why you want this? -- Marcoif (defined ("A")) echo "A is a constant";} doSth ("foo"); Cheers, Jay