On Tue, 2012-09-18 at 08:19 -0400, Rasmus Schultz wrote: > Hey, > > I'm going to make this brief, because I suspect a lot of people are going > to jump at the opportunity to cry bloody murder when I suggest this. > > I wonder if it would make sense to have a way to globally hook into > __construct() - sort of like how you can hook into the autoloaders with > spl_autoload_register() ... > > This could be useful for things like dependency injection and debugging.
I don't think it's a good thing to have. "new" right now gives you a clear idea whats going on. Magic behind the scenes is hard to debug. If you really want it: https://github.com/johannes/php-test-helpers johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php