What are common ways to include version information in PHP classes and which one is recommended?

One common way to include version information in PHP classes is to define a class constant that stores the version number. Another approach is to use a docblock comment above the class declaration to specify the version information. The recommended approach is to use a class constant as it provides a clear and easily accessible way to retrieve the version information.

class MyClass {
    const VERSION = '1.0.0';
    
    // class implementation
}