12.2. PEAR Standards

PEAR's Coding Standard, or PCS for short, is primarily meant for developers of PEAR packages. Some of it is useful for those who just use PEAR packages as well, especially the section about how different types of symbols are named. Even if you are not planning to develop any PEAR packages yourself, it is a good idea to read the section on naming so you know what to expect when you use PEAR packages.

12.2.1. Symbol Naming

Different types of symbols, such as function or variable names, have naming schemes designed to make each type of symbol stand out from each other.

12.2.1.1. Constants

Constant names are all uppercase, with the (uppercased) package name as a prefix. Here are some examples:

 PEAR_ERROR_DIE (from PEAR package) ...

Get PHP 5 Power Programming 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.