PHP Traits
One of the problem of PHP as a OOP language is, the fact that you can only have single inheritance. This means your class can only inherit from one other class.   PHP Traits (new feature was added in PHP 5.4) is kind of like a Mixin, allows you to mix Trait classes into an…

PHP Magic Predefined Constants & usages
PHP Magic Predefined Constants & usages In PHP, a constant is a name or an identifier for a simple value. A constant name starts with a letter or underscore can be followed by any number of letters, numbers, or underscores. If you have defined a constant, it can never be changed or undefined.   You…

A Quick view on PHP magic methods
Magic Methods in PHP (PHP Magical Reserved Functions Starts with double underscore) According to me you all have heard about the PHP Magic methods. You have also used some of these like __autoload and __construct.   Let’s have a quick view on magic methods, as sometimes it looks like it will hard to use these…

Search Engine Spider and User Agent Identification with “Ultimate User Agent Blacklist”
Search Engine Spider and User Agent Identification with “Ultimate User Agent Blacklist”   A user-agent is software (a software agent) that is acting on behalf of a user. In many cases, a user-agent acts as a client in a network protocol used in communications within a client–server distributed computing system.   For more information view…

How to achieve and use Polymorphism in PHP
Polymorphism – the concept   Polymorphism is a Greek word that means “many forms”. In object-oriented programming, polymorphism is a mechanism by which objects of different types can process data through a single interface. Using a typical illustrative example, a program might define a type of object called Animal, containing a function called talk() and,… (6 comments)