In this article, you will learn how to create a class in PHP. The class keyword in PHP is used to create classes.
examples of the CLASS keyword
Example 1. In this example, we declare a class.
<?php
class MyClass {
public $number = 5;
}
$obj = new MyClass();
echo $obj->number;
?>