PHP equivalent of python setattr
setattr(obj, name, value)
sets property name of obj to value in python.
You can do the same in php with
$obj->$name = value
note the $ in front of the name
$obj->name = value would be in python
setattr(obj, 'name', value)
or simply
obj.name = value
Trackback URL for this post:
http://v3.tronche.com/trackback/85

Derniers commentaires
13 weeks 6 days ago
30 weeks 5 days ago
1 year 3 weeks ago
4 years 2 weeks ago
1 year 42 weeks ago
4 years 2 weeks ago