Constants
| From: | Jakes | Date: | Tue, 23 Mar 2004 07:48:25 +0000 |
| Subject: | Constants | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181236@lists.php.net to get a copy of this message | ||
The bug server looks like its down, so I will just post the bug here, and
hopefully someone
will spot it
PHP version: 5RC1
<?php
interface Foo {
const MY_FOO = "hello world";
}
class Bar implements Foo {
public function displayFoo(){
print MY_FOO;
}
}
$obj = new Bar;
$obj->displayFoo();
?>
The results should display "hello world", but it prints out MY_FOO.
Thanks
Jakes