O'Reilly logo

PHP and MySQL Web Development, Third Edition by Laura Thomson, Luke Welling

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

Chapter 23. Other Useful Features

Some useful PHP functions and features do not fit into any particular category. This chapter explains these features.

Key topics covered in this chapter include

  • Using magic quotes

  • Evaluating strings with eval()

  • Terminating execution with die and exit

  • Serializing variables and objects

  • Getting information about the PHP environment

  • Temporarily altering the runtime environment

  • Loading PHP extensions

  • Highlighting source code

  • Using PHP on the command line

Using Magic Quotes

You have probably noticed that you need to be careful when using quotation marks (' and ") and back slashes (\) within strings. PHP gets confused by an attempted string statement like

echo "color = "#FFFFFF"";

and gives a parse error. To include quotation marks ...

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