Edit report at http://bugs.php.net/bug.php?id=52823&edit=1
ID: 52823 Updated by: cataphr...@php.net Reported by: klawd+phpbugs at kamundo dot de Summary: getting constants off variables works, not fields -Status: Open +Status: Bogus Type: Bug Package: Class/Object related Operating System: ubuntu PHP Version: 5.3.3 Block user comment: N New Comment: Constants are like static fields, you're supposed to access them statically. Even if you were to disagree, this is by design; it's not a bug. Previous Comments: ------------------------------------------------------------------------ [2010-09-13 04:08:36] klawd+phpbugs at kamundo dot de Description: ------------ <?php // this works: $class = new MyClass(); echo $class::constant."\n"; // As of PHP 5.3.0 // this doesn't but should: class Foo { public function __construct() { $this->bar=new MyClass(); echo $this->bar::constant; } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52823&edit=1