Class

Basic class definitions begin with the keyword class, followed by a class name, followed by a pair of curly braces which enclose the definitions of the properties and methods belonging to the class.

<?php

class x {
    const CONSTANT = 1;

    private $property = 2;

    function method() {
        /// and more
    }

}

?>

Documentation

Related : Readonly, Class Invasion, Const, Class Getter Method, implements, Inheritance, Method, Class Setter Method, Trait, Class Wither Method, Structure, Class Interface Trait Enumeration (CITE)

Added in PHP 4.0+