What is static keyword in PHP?

What is static keyword in PHP

Overview The static keyword is used to declare property or method of a class as static. If we declare a property or method as static in a class, we can access them without instantiating the class itself. The property or method can also be accessed statically within an instantiated class object. We can also define … Read more

Categories PHP

What are magic methods in PHP?

What are magic methods in PHP

Magic methods are special methods which override PHP’s default’s action when certain actions are performed on an object.

Categories PHP

How to remove value from array in PHP?

How to remove value from array in PHP

We know that in PHP an array is a built-in data type that stores a number of values in one single variable. I have previously discussed arrays and different types of arrays in PHP in a post titled What is an associative array in PHP. In this article we will learn how to remove an … Read more

Categories PHP

What is final keyword in PHP?

What is final keyword in PHP

The final keyword in PHP The final keyword can be used for class, class methods, and class constants in PHP. If the final keyword is used before the class then it can be called a final class and if final keyword is used before any method of the class then it can be called a … Read more

Categories PHP

How to create an HTML sitemap page for WordPress?

How to create an HTML sitemap page for WordPress

Overview A WordPress sitemap is a list of public URLs on a WordPress website. In general, we display posts, pages, and category URLs on the sitemap page. We can follow any of the following methods to create a sitemap page. Methods to create a sitemap page In the first method we will create the sitemap … Read more

How to search a multi dimensional array in PHP?

How to search a multi dimensional array in PHP

We know that an array is a built-in data type of PHP that stores a number of values in one single variable. A multidimensional array is a type of an array that can store one or more than one arrays. I have discussed about array and different types of array in my previous post which … Read more

Categories PHP

What is trait in PHP?

What-is-trait-in-PHP

Trait in PHP PHP is a single inheritance language. It means a child class can inherit only from only one parent in PHP. I have added a diagram below to illustrate how single inheritance works in PHP. In the above example we can see that Class A is the root level parent class. Class B … Read more

Categories PHP

What is the difference between interface and abstract class in PHP?

What is the difference between interface and abstract class in PHP

One of the most important concepts in object oriented programming is abstract class and interface. In this article, we will learn the difference between interface and abstract class in PHP. Before that, we will learn what is the interface and abstract class And how to use them in PHP. What is an interface? Interfaces are … Read more

Categories PHP