PHP Syntax OOP Terms Autoloading


- Info:

- Defining this function eliminates the need for the require_once() statements.

- When class is invoked for the first time, __autoload() will be called, loading the class.


- Single File:

- This example shows how to create and use class within the same file.

- Creat PHP Console Application Test.php.




class Person {

function say() { echo "Hello from Person."; }





$person = new Person();


function __autoload($class) {