nd it’s been part
> of C# for a long time.
>
> -- Gwynne Raskind
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Pete Boere
Web Developer
>
> What's your use case for this kind of static properties? What if you make
> them private/protected and use an accessor method to initialize them (and
> avoid the overhead during autoloading)?
>
It's the overhead of repeatedly calling an accessor method which I'
$bar;
static function init () {
// Create $bar with expressions...
self::$bar = $bar;
}
}
Foo:init();
A custom autoloader could of course anticipate this but with systems like
composer that have a shared autoload, it'd be nicer to use those than rely
on a custom loader.
t>($inst->bar::callable);
$inst->bar();
}
function bar() {
var_export <http://www.php.net/var_export>(B::baz::callable);
}}
--
Pete Boere
Web Developer