Class inheritance in PHP

Classes in PHP can inherit properties or methods of another class. When a new class is created, then a new class may use extends keyword to specify what is underlying class a new class is based on. This will do two things:

1. Minimize errors while developing a new functionality by utilizing functionality that exists in a parent class.

2. Reduce or completely remove duplicate functionality.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator