rfc:class_properties_initialization
This is an old revision of the document!
Request for Comments: Class properties initialization
- Version: 1.0
- Date: 20010-07-30
- Author: Krzysztof Antczak k.antczak@livedata.pl
- Status: In Draft
- First Published at: http://wiki.php.net/rfc/class_properties_initialization
Introduction
The purpose of this feature is to provide more advanced way to initialize class properties using closures, objects, type hinting.
Why do we need it?
- annotations
Proposal
It's possible that this feature would be one of the best use with proposals: annotations, returntypehint and enum
class Foo { private $var1 = new Bar(); private $var2 = function () { /* some callback ? */ } private $var3 = array ( 'foo' => function () { /* some callback ? */ } ); private httpRequest $var4 = NULL; }
Changelog
2010-07-30 k.antczak Initial RFC creation.
rfc/class_properties_initialization.1280484602.txt.gz · Last modified: 2017/09/22 13:28 (external edit)