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

Gonzalo Ayuso's Blog: How to protect from SQL Injection with PHP

Zend Developer Zone: PHP Security Tips #6 and #7

Christian Stocker's Blog: Profile XSLT transformations within PHP

Kevin Schroeder: The cost of logging

SoftLayer Blog: Four Rules for Better Code Documentation


Community Events





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


code language install release interview application series community api laravel library wordpress configure list threedevsandamaybe developer bugfix podcast symfony introduction

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