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

Gareth Heyes' Blog: Non alphanumeric code in PHP

PHP Addiction Blog: PHP - No Container libraries?

Fabien Potencier's Blog: On PHP 5.3, Lambda Functions, and Closures

Gonzalo Ayuso's Blog: PHP Template Engine Comparison

Ilia Kantor's Blog: Pluggable/Tunable Template Benchmark


Community Events

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


community application performance symfony2 language framework release php7 podcast configure conference introduction series opinion example interview laravel api install library

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