ReflectionProperty::isInitialized
Checks whether a property is initialized
&reftitle.description;
public boolReflectionProperty::isInitialized
objectobject
Checks whether a property is initialized.
&reftitle.parameters;
object
If the property is non-static an object must be provided to fetch the
property from.
&reftitle.returnvalues;
Returns &false; for typed properties prior to initialization,
and for properties that have been explicitly unset.
For all other properties &true; will be returned.
&reftitle.errors;
Throws a ReflectionException if the property is inaccessible.
You can make a protected or private property accessible using
ReflectionProperty::setAccessible.
&reftitle.examples;
ReflectionProperty::isInitialized example
isInitialized($user));
$user->name = 'Nikita';
var_dump($rp->isInitialized($user));
?>
]]>
&example.outputs;
&reftitle.seealso;
ReflectionProperty::hasType