list constants of class php code example Example: php list all constants print_r(get_defined_constants());