Re: note 9782 added to get_class_vars
| From: | J. M. Castagnetto | Date: | Sat, 25 Nov 2000 07:32:17 +0000 |
| Subject: | Re: note 9782 added to get_class_vars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8125@lists.php.net to get a copy of this message | ||
Incorrect. The following works as expected (PHP
4.0.3pl1, RH 6.1):
class foo {
var $boolarr = array("false"=>0, "true"=>1);
var $name = "foo object";
function foo ($name="") {
if ($name)
$this->name = $name;
}
}
$o = new foo();
$vars = get_class_vars("foo");
print_r($vars);
Outputs:
Array
(
[boolarr] => Array
(
[false] => 0
[true] => 1
)
[name] => foo object
)
Your code logic may be incorrect. Are you testing to
see what type of result each array item has?
Your note will be removed.
--- albertjiang@yahoo.com wrote:
> Doesn't work with member variables that are arrays.
>
>
>
http://www.php.net/manual/function.get-class-vars.php
>
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/