O'Reilly logo

PHP by Robin Nixon

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

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

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