I know the subject line might sound a bit like an oxymoron, but bear
with me!

What I'd like to have is a property of an object that behaves like a
public variable when it comes to reading, but like a protected one when
it comes to writing, as it would make my code a lot easier to read.

I know about the __get($var) method to magically provide this behaviour,
but from all I've read it can be pretty slow compared to a regular
public variable. I've seen a thread on the dev lists where someone
requested it, but can't find anything in the manual.

Does anyone know if this is available in a later version of PHP, or if
it's implementation is penned for some time in the future?

Thanks,
Ash
http://www.ashleysheridan.co.uk


Reply via email to