API Documentation for: 1.1.1
Show:

ifconstor Class

Namespace: global

Global function to evaluate if a constant is set, or else use default. This is a global function.

$c = ifconstor('MY_CONST', 10);

Constructor

ifconstor

(
  • constName
  • [default='']
)
Mixed

Parameters:

  • constName String

    The constant name to check

  • [default=''] Mixed optional

    The default value if the constant isn't defined

Returns:

Mixed:

The value of the constant or the default value

Item Index