O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required