Interpreting vs. Compiling

PHP uses a blend of interpretation and compilation in order to provide the best mix of performance and flexibility to programmers. Behind the scenes, PHP compiles your script down to a series of instructions (called opcodes) whenever it is accessed. These instructions are then executed one by one until the script terminates. This constant recompilation […]

Data types in php

PHP support eight primitive data types Scalar data types : 1. boolean 2. integer 3. float , double 4. string Compound data types : 1. array 2. object Special data types : 1. resource 2. NULL Beside this, there php introduces few pseudo-types 1. mixed 2. numbers 3. callback 4. array | object 5. void […]

What can PHP do?

PHP is mainly focussed on server side scripting so that you can do anything any other CGI language can do. There are three widely areas in which PHP is used 1. Server side scripting : PHP is server side scripting language in which the processing is done at the server end and response transferred as […]

Constructors and Destructors

Constructor :  void __construct ([ mixed $args = “” [, $… ]] ) PHP 5 allows developers to declare constructor methods for classes. Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used. Note: Parent constructors […]

How to setup virtual host in wamp

I will demonstrate how to host more then one site on WAMP. I believe that WAMP is up and running on your window machine. Suppose you want to host, say localhost my.localhost We will consider all the file one by one that need to be modified: host Go to “C:/Windows/System32/drivers/etc” and open the “hosts” file […]