Images

Using Constants and Superglobals

Images To view the accompanying video for this lesson, please visit mhprofessional.com/nixonphp/.

When developing with PHP, you often need to work with values that never change. When doing so, the convention is to create constants to make this absolutely clear to other people who may maintain your code. It also assists you because constants cannot have their values changed, so some potential bugs can be avoided through using them.

   Indeed, PHP itself comes with a wide range of constants, ready-assigned useful values, ...

Get PHP: 20 Lessons to Successful Web Development 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.