Classes

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 : Class Wither Method

Added in PHP 4.0+