Hi All,
<?php
class Foo {
   const HELLO = "con\n";
   function memberfunc() {
     echo HELLO; //does not work
     echo Foo::HELLO; //works
   }
}
$obj = new Foo();
$obj->memberfunc();
?>

With a error_reporting=2047 I get 

Notice: Use of undefined constant HELLO - assumed 'HELLO' in
/rekha/php-5.0.0/test.php on line 5
Whey echo HELLO fails?

With regards
Kamesh Jayachandran

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

Reply via email to