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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to