class variable problem

From: Date: Tue, 12 Feb 2002 16:52:14 +0000
Subject: class variable problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-79987@lists.php.net to get a copy of this message
This doesn't make sense: <?php error_reporting(E_ALL); class foo { var $bar; } $n = new foo; echo $n->bar; ?> Results in: PHP Notice: Undefined property: bar I think it's misleading in best case. Property 'bar' *is* declared, so I think it should have an entry in class's default_properties table, even though it's not assigned a value. Please copy me on replies. -Andrei * The cost of living hasn't affected its popularity. *

« previous php.dev (#79987) next »