What is the correct syntax for defining constants in a class in PHP?

To define constants in a class in PHP, you can use the "const" keyword followed by the constant name and its value. Constants in PHP are case-sensitive by default and can be accessed using the scope resolution operator (::). It is recommended to define constants with uppercase letters to differentiate them from class properties.

class MyClass {
    const MY_CONSTANT = 'Hello, World!';
}