|
ReflectionProperty::setValueSet property value Description
public void ReflectionProperty::setValue
( object
$object
, mixed $value
)
public void ReflectionProperty::setValue
( mixed
$value
)Sets (changes) the property's value. Parameters
Return ValuesNo value is returned. Errors/ExceptionsThrows a ReflectionException if the property is inaccessible. You can make a protected or private property accessible using ReflectionProperty::setAccessible. Examples
Example #1 ReflectionProperty::setValue example
<?php The above example will output: string(3) "foo" string(3) "bar" string(6) "foobar" See Also
|