PHP: The cost of a million objects on function calls

Especially, if you are a start-up, all it takes is a fine combination of: a bad coder (with an arrogant attitude of “code first + optimize later”) and 1000 simultaneous requests to bring each of your servers to its “knees”. On part 1, I’ve mentioned the cost of a million items when we are using … Read morePHP: The cost of a million objects on function calls

PHP Memory Usage: The cost of a million objects

Even though memory is getting cheaper, our applications are becoming more complicated and we need to write our code more carefully. I’d like to share some surprising tests I’ve written recently. The sample code files are also on github: https://github.com/muratyaman/php-tips. The tests are very simple: let’s create an array of million items to process: version … Read morePHP Memory Usage: The cost of a million objects