Hi Dmitry, > > I thought about a different approach :) > > > - not-nullable typed properties must be explicitly initialized (or > should be initialized implicitly by corresponding types, e.g. "int" > should get default value int(0). ...) > > - nullable typed properties may be implicitly initialized by NULL > (like untyped properties now). > > - unset() of typed properties should not be allowed > > > This would allow to eliminate few weird run-time checks in VM and > allow the most efficient usage of type information in Optimizar and > JIT.
For scalar types, that's fine but, in practice, it forces object properties to be nullable, as they cannot be initialized explicitely. Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php