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 […]

Errors in PHP.

There are three basic types of runtime errors in PHP: Notices: These are small, non-critical errors that PHP encounters while executing a script – for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all – although the default behavior can be changed. […]

Explain the different types of errors in PHP.

E_ERROR: A fatal error that causes script termination E_WARNING: Run-time warning that does not cause script termination E_PARSE: Compile time parse error. E_NOTICE: Run time notice caused due to error in code E_CORE_ERROR: Fatal errors that occur during PHP’s initial startup (installation) E_CORE_WARNING: Warnings that occur during PHP’s initial startup E_COMPILE_ERROR: Fatal compile-time errors indication […]

What is PEAR in php?

PEAR(PHP Extension and Application Repository) is a framework and repository for reusable PHP components. PEAR is a code repository containing all kinds of php code snippets and libraries. PEAR also offers a command-line interface that can be used to automatically install “packages”.

What is PHP?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP started out as a small open source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first […]