Hi! >> True. But I don't see how would it work for typed properties - what >> exactly would happen after unset? Would it be - as it is now - that it >> is as if the property was never defined, or would it be something else? >> > > In my opinion it should simply vanish along with its definition. I mean, > isn't that the definition of unset in general.
Right, that would be the easiest way. But then you lose guarantee that variable you marked as "int" is indeed always int - you could unset it and then set it to whatever you want because it no longer has a definition! OTOH, we do have precedent for properties that can not be unset - namely, static properties can not be unset. They can be nulled-out, of course, and they default to null. I have no idea how "static int $x;" would work though. The current RFC doesn't implement it, which definitely would be weird since people would expect if you can have typed object property, you can have typed static property, but that's not what the RFC says. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php