Appendix C. PHP Environment Constants

As discussed in Chapter 4, a long list of standard constants changes with point releases of the PHP engine. They are contributed by the PHP community, Zend Corporation, and SAPI modules. There are also variations based on the modules used in your server environment.

Finding the defined constants in your environment can be done by using the get_defined_constants() function, but it does not render them in a user-friendly way. Sorting the returned array is a bit tricky too because it will require a user-defined sort function.

The GetConstants.php program demonstrates how you can discover your environment constants and provides a user-defined sort function to alphabetize them. The program formats the output into ...

Get Oracle Database 10g Express Edition PHP Web 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.