Garbage Collection in PHP – Amazing feature

Last few week i worked on data scrapping projects, million of pages need to scrap and later insertion into database. cron jobs were set to process these records and were running for many days. memory management become critical for that project. In PHP we have two most famous ways to free memory after job is […]

Check PHP Code Performance and stdClass using InfiniteIterator

Following code is written using stdClass and PHP iterator “InfiniteIterator”

And this code wrap between microtime() function to checkout the time consumed for this operation from start to end. stdClass class object hold three dynamic variable which we assign at the run time, then we pass the stdClass object to Itrerator “ArrayIterator” and then to […]

How to install Composer (Dependency Manager for PHP) in Windows

Installation of Composer on Windows(XP, 7, 8) is easy, its only take few steps. What is Composer? it is a dependency manager tracking local dependencies of your projects and libraries. get it here. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. I assume you have xampp […]

Create a Custom Page Template in WordPress

Creating custom page templates in WordPress is easy! Its just following line of code which you need to put at the start of page template file. let’s start creating a page template called ‘project.php’ and put following line of code at start of this file and using FTP client upload this file to your theme folder. […]