Hello Clint, Nikita and Stas.

> To facilitate complete functionality with properties it is necessary to
> provide accessor functions to act on isset() and unset() calls.
> Note: isset & unset implementations are always provided with default
> implementations unless the author explicitly defines their own.

a) With magic methods we can make the accessed property inaccessible (as
properties may appear/disappear at runtime) and so we need some magic there
(__isset/__unset as of 5.1).
A property (accessors) is defined at design-time and may not become
inaccessible so the default implementation for isset/unset should be sufficient.

b) Result of (unset)$this->foo is always NULL.
If we provide a way to alter this "set(NULL)" behavior:
- it may fail before calling set(NULL)
- unset($this->foo); $this->foo !== (unset)$this->foo; // foo is not foo?

c) Logically isset/unset methods wrap up getter/setter at a higher level.
Maybe both methods are better suited for "operator overloading/overriding RFC"
where i would again expect some magic too.

I wonder what the functionality would be as someone have to override
isset/unset accessors. Do you have some examples?

cryptocompress

http://3v4l.org/NJWsW


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to