News Feed
Sections




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

ParticleTree.com:
Object Oriented Memory Concerns
September 18, 2008 @ 11:17:00

In a new article to his blog, Ryan Campbell has expressed some concerns in the amounts of memory that some of the object oriented practices in PHP are using these days.

It's hard to imagine pushing the limits of object oriented PHP so far that your web servers choke, but the truth is those limits are reached faster than you think. [...] While replacing objects with arrays when possible makes things a little better, the most performance friendly approach involves appending strings. For your convenience, we've run some tests that measure page execution times and memory usage to create the following guideline to help you plan out what areas of your code may have to break away from an object oriented nature.

He shares some benchmarks of the memory use for different variable types - strings, arrays and objects - giving load times and the amounts of memory used. He mentions three workarounds that could help (unset, static methods and paging) reduce the memory consumption of your script.

0 comments voice your opinion now!
oop object oriented memory concern unset static benchmark


blog comments powered by Disqus

Similar Posts

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 4: The View Factory

Stefan Mischook's Blog: Object Oriented PHP Tutorial Updated - Steps 18 - 22

DevShed: Expanding the Application Range of Visitor Objects in PHP 5

SitePoint.com: What Happened when we Talked PHP with the Experts

Zend Developer Zone: PHP and your domain model with Doctrine ORM


Community Events





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


library podcast update series opinion community language interview framework package version introduction voicesoftheelephpant security install release composer laravel symfony tool

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