If you define constants with in a interface and then implement that
interface
it does not work on 5RC1
This should work, but it displays the constant name rather than value it
references
interface Settings {
const UNAME = "somename";
const PWORD = "password";
const SERVER = "localhost";
}
class Conn implements Settings {
public function __construct(){
$dbConn = mysql_connect(SERVER, UNAME, PWORD);
}
}
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Not too fast.....
>From http://www.php.net/zend-engine-2.php
PHP 5 introduces per-class constants:
<?php
class Foo {
const constant = "constant";
}
echo "Foo::constant = " . Foo::constant . "\n";
?>
[/snip]
My bad. Still not a bug.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php