How much memory do PHP variables use?

April 10th, 2014 by Laeeq | No comments

There are cases when it might be quite important to know how much memory uses each variable in PHP script. The function memory_get_usage returns the amount of memory, in bytes, that’s currently being allocated to your PHP script.

Read Full Post »

Manipulating PHP arrays: push, pop, shift, unshift

April 5th, 2014 by Laeeq | No comments

In spite of allowing direct access to individual array element, PHP also provides various other interesting ways to deal with arrays. In particular, there are functions that make it very easy and efficient to use a PHP array as a stack or as a queue.

Read Full Post »

10 Super Useful PHP Code Snippets

March 22nd, 2014 by Laeeq | No comments

Code snippets are always useful which saves your precious time and also increase productivity. Today, I’m sharing some super useful PHP code snippets that I’ve collected over the past months.

Read Full Post »

Let’s play with php.ini file Configuration

March 21st, 2014 by Laeeq | No comments

Whether you’re novice or experienced PHP programmer, PHP.ini configuration is essential. It’s an important configuration file that is used to customize behaviour of PHP at runtime. When PHP server starts up it looks for PHP.ini file first to load various values for settings.

Read Full Post »

15+ regular expressions for PHP developers

March 5th, 2014 by Laeeq | No comments

Regular expression is really very useful which allows search, validation, finding, identifying or replacing text, words or any kind of characters. Here in this post, I’ve listed 15+ useful PHP regular expressions and functions that might be helpful for any PHP developer.

Read Full Post »

10 Most Important Directory Functions in PHP

February 19th, 2014 by Laeeq | No comments

When writing PHP scripts that need to deal with the file-system to change the current directory, creating new directories, change the root directory, gets the current working directory, list files and directories inside the specified path and many more. For this, PHP provides a number of built-in directory functions that can be used to perform such tasks.

Read Full Post »

Determining variable types in PHP

February 12th, 2014 by Laeeq | No comments

PHP, as most of us know, has weak typing. What this means is that variable types are determined by context. It’s not always obvious what type a given variable is at any one time. It determines the types of variables and converts them as per requirement.

Read Full Post »

10 Super Useful code snippets for Magento Developers

February 8th, 2014 by Laeeq | No comments

When developing with Magento I have maintain a library of most used code snippets. These code snippets are very useful when developing theme or custom module since they save your precious time. You can just use this code snippet as it is without making any major change. Here I’m sharing those super useful Magento snippets that I’ve collected over the past year. Enjoy!

Read Full Post »

PHP 5.5.9 Available for Download

February 6th, 2014 by Laeeq | No comments

PHP development team has announced current stable version PHP 5.5.9 for download. It’s a second release in 2014 and has fixed several bugs against PHP 5.5.8 release in January 2014. You can upgrade your PHP by download it from PHP official website.

Read Full Post »

Quick Tips for Secure Session Management

February 2nd, 2014 by Laeeq | No comments

Most of modern websites are using sessions to control the experience for individual users, and to maintain state between requests (since HTTP is a stateless protocol after all). Sessions are fantastic and incredibly useful, but if managed incorrectly they can expose your website to security vulnerabilities and potentially allow a malicious attacker to gain unauthorized access to user accounts.

Read Full Post »