>Personally, I don't see why 'default' can't be used: >class Foo { > public $bar { get; set; default 5; } } > >This solves the var_dump() problem, and if people want dynamic get returning something other than the property/field value, so be it. >C# does indeed have an internal field per property though, even if it is an anonymous backing field.
Is there a reason we cannot just have var_dump/print_r show it more like this? object(Time)#1 (2) { ["seconds"]=> int(16200) ["hours"]=> NULL ["hours:getter"]=> float(4.5) } (Although I am against the idea of having a *hidden* value accessible inside the getter/setter) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php