Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Class Interface Trait Enumeration (CITE)

CITE stands for Class Interface Trait Enumeration. It represents all four types of PHP structures, also called classlike structures, when they interact together.

In particular, all four of them share the same namespaces, which may create naming conflicts. This is unlike functions and constants, which both have their own namespaces.

<?php

    class Elephpant {}

    interface Migratory {}

    trait Foraging {}

    enum Habitat {}

    const Elephpant = 1;
    function Elephpant() {}

?>

Documentation

See Also