Acro Media
Author Acro Media
Posted in Development , Video , Drupal
April 19, 2018
read
Back to blog

How Memory Works in PHP and Its Hidden Costs

DrupalCon Nashville 2018 Session

Join Shawn McCabe, Acro Media CTO, as he goes behind the scenes and teaches a bit about how PHP uses memory when it runs your code. PHP's ease of use and low barrier to entry also have some side effects to how memory is used, sometimes using memory differently and in places you didn't expect. If you're doing small pages that load quickly, for a low traffic site, this probably won't even be noticeable unless things go quite wrong. Once you get into heavy pages on high traffic sites, or even worse, long running background processes, then knowing a bit more about the memory you're using can help a lot.

Check Out Our High Five Drupal Web SeriesIn PHP, variables have a lot of meta-data they need to store, since they can be any size and of any type. They need all this meta data to store information like how much data they hold, what type of data it is and how it is stored. Often this "hidden" meta data cost will use more memory than the actual info you are storing, although recent versions of PHP have improved on this.

The idea isn't to learn every low level detail, just to have a little knowledge of what is happening with memory usage when you're programming so you can be cognizant of the choices you make and a bit more efficient in your usage.

Hopefully this talk will be interesting to even experienced developers, but you only need some programming basics to follow along.

Talk to us

Acro Media is a Drupal Commerce development agency that specializes in enterprise-level ecommerce. We are committed to building strong strategic partnerships and using our ecommerce expertise to help clients create a dynamic web presence that engages audiences, generates revenue, and boosts brand awareness.

Contact Acro Media Today!

The Heartbleed Bug - What you need to know!

You may have heard of the "Heartbleed" security issue, which is affecting many sites across the internet, including enormous entities such as the ...
Keep Reading »

6 Things You Should Never Do in UX Design

“I love buying stuff from sites that make me click seven times to add an item to my cart, create an account, and fill out the same information for ...
Keep Reading »

Choosing the Right Content Management System for Your Business

Having the right content management system (CMS) is more important than ever for the success of your business. That’s because the flexibility of your ...
Keep Reading »

Fields marked with * are required.

×
×