Name

define

Synopsis

int define(string name, mixed value[, int case_insensitive])

Defines a constant named name and sets its value to value. If case_insensitive is set and is true, the operation fails if a constant with the same name, compared case insensitively, is previously defined. Otherwise, the check for existing constants is done case sensitively. Returns true if the constant could be created, or false if a constant with the given name already exists.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.