News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Phil Bennett:
Revisiting Benchmarking Dependency Injection Containers
July 30, 2013 @ 11:56:49

Phil Bennett has returned to a topic he covered earlier to refresh some of the statistics and add a few newer technologies to the mix. In this new post he benchmarks some of the more popular PHP-based dependency injection containers.

A few months ago I wrote a post detailing and benchmarking several dependency injection containers. Recently there have been some changes to some of these containers and some new packages have appeared in the community so I decided to revisit the post and update it a little. When I say a little, I'm going to be re-writing the entire post to give you a little more information about the containers and some more in-depth benchmarks.

Several new DI containers were added including the AuraDi, PHP-DI and LeagueDi. His benchmarks measure the time taken for these operations:

  • Extremely nested object fetching
  • Registering all objects
  • Resolving objects (w/dependencies) using a factory
  • Injecting pre-defined constructor values
  • Resolving dependencies with setter calls

Code for the test and graphs of the outcomes are provided for each benchmark on the list. There's also a bit of analysis at the end of the post detailing some of the pros and cons of each.

0 comments voice your opinion now!
benchmark dependency injection container di microseconds code

Link: http://happyaccidents.me/revisiting-benchmarking-dependency-injection-containers/

blog comments powered by Disqus

Similar Posts

Patrick Allaert's Blog: Benchmarking Zend Platform, APC and Xdebug

Anthony Ferrara: Programming With Anthony - Dependency Injection

Sameer Borate's Blog: Benchmarking Wordpress SQL using FirePHP

QaFoo.com: Code Reuse By Inheritance

Benjamin Eberlei's Blog: Using Symfony Dependency Injection with Zend_Application


Community Events

Don't see your event here?
Let us know!


community example voicesoftheelephpant version application series extension api framework interview laravel performance symfony2 conference podcast introduction library opinion php7 release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework