<?php class Profile { const LABEL_FIRST_NAME = "First Name"; const LABEL_LAST_NAME = "Last Name"; const LABEL_COMPANY_NAME = "Company"; } $refl = new ReflectionClass('Profile'); print_r($refl->getConstants());<?php class MyClass { const CONSTANT = 'constant value'; function showConstant() { echo self::CONSTANT . "\n"; } } echo MyClass::CONSTANT . "\n"; ?>