|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-07 02:51 UTC] kkobashi at thegrid dot net
class A
{
var $hello;
var $world;
function A()
{
$this->hello = "hello";
}
}
$a = get_class_vars("A");
foreach ($a as $key => $val)
{
echo $key . ": " . $val . "<br>";
}
Output does not show the value as it suggests in the documentation. The output I get is:
hello:
world:
Notice that the value of $hello is not shown.
Docs say uninitialized variables are not shown. But clearly hello is initialized.
Calling this:
$a = get_class_vars("A");
print_r($a);
Produces:
Array ( [hello] => [world] => )
Which also is wrong because of no values in hello
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 02:00:02 2025 UTC |
$this->bogus('onUserRequest');