PHP » PYTHON |
login |
register |
about
|
PYTHON get_object_vars
is this article helpful?
|
Python replacement for PHP's get_object_vars
[
edit
| history
]
result = dir(myObj) get_object_vars(PHP 4, PHP 5) get_object_vars — Gets the properties of the given object Description
array get_object_vars
( object $object
)
Gets the accessible non-static properties of the given object according to scope. Parameters
Return ValuesReturns an associative array of defined object accessible non-static properties for the specified object in scope. If a property have not been assigned a value, it will be returned with a NULL value. Changelog
Examples
Example #1 Use of get_object_vars()
<?php The above example will output: array(2) { ["b"]=> int(1) ["c"]=> NULL } array(4) { ["a"]=> NULL ["b"]=> int(1) ["c"]=> NULL ["d"]=> NULL }
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|