CHAPTER 6Working with Strings

Considered pretty much a staple of any programming language, the ability to work with, maneuver, and ultimately control strings is an important part of a daily programming routine. PHP, unlike other languages, has no trouble using data typing to handle strings. Thanks to the way PHP is set up—that is to say, that when a value is assigned to a variable, the variable automatically typecasts itself—working with strings has never been easier. PHP 5 has not done much to improve upon, or modify, the way strings are handled in PHP itself, but it has provided you with new and improved class functionality so you can more readily create tools to help support PHP's somewhat clunky string function naming conventions.

This chapter's ...

Get PHP 5 Recipes: A Problem-Solution Approach 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.