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

NetTuts.com: Refactoring Legacy Code - Part 11: The End?

Nils Adermann: Composer: Replace, Conflict & Forks Explained

Kevin Schroeder's Blog: ZF2 Dependency Injection - Multiple Object Instances

Juan Treminio: An introduction to Pimple and Service Containers

Sam Hennessy's Blog: A Dependency Injection for PHP Manifesto - Part 1 (What I Want)


Community Events





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


security interview framework list podcast laravel conference composer tool opinion introduction voicesoftheelephpant symfony language series community library release artisanfiles version

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