Chapter 5. Strings and Regular Expressions

Terms You’ll Need to Understand

  • The == and === operators

  • Regular expression

  • PCRE

Techniques You’ll Need to Master

  • Formatting strings

  • Comparing strings

  • Modifying string contents

  • Using regular expressions for pattern matching and extraction.

  • Joining and splitting strings

The Web is largely a text-oriented environment. Data is submitted to websites in the form of text strings, and the response (be it in HTML, XML, or even an image format) is generally text as well. Accordingly, being able to analyze and manipulate text is a core skill of any PHP programmer.

Comparing Strings

In this section, you will learn how to test whether two strings are equal, or whether one string exists inside of another string.

Comparison ...

Get Zend PHP Certification Study Guide 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.