PHP: Interfaces

PHP

Interfaces are contract that ensures the availability of methods/actions that an object must contain. By implementing an interface, a class agrees to contain the definitions of the methods declared in the interface. Interfaces have just the declaration/signature of the method, and the classes(that implement the interface) must have the definition of those methods.

Data Structure: Graph

Data Structures

Graphs are data structures with connected nodes/vertexes. We are using the adjacency list approach to represent a Graph here. In this article, we are discussing the implementation of Graph in JavaScript and TypeScript.

PHP Programming

PHP

PHP is one of the most popular programming languages for web application development. PHP is easy to learn and easy to use. PHP stands for “PHP Hypertext Preprocessor”.

PHP: Traits

PHP

Traits facilitate code reuse in PHP by providing a simple way to define functionality and reuse those functionalities when we need it. Traits do not comply with the “is-a” nature of inheritance, so traits do not follow the true strict inheritance. As we can use multiple traits in a class, so it compensates for the lack of multiple inheritance nature of PHP.

Data Structure: Hash Table

Data Structures

Hash table data structure is used to store key-value data pairs. Main benefit of using a Hash Table is the performance improvements for set and get operation of data. In this article, we are discussing the implementation of Hash Table in JavaScript and TypeScript.