PHP ships with dozens of built-in string functions. The most-used ones let you measure, transform, and slice strings without writing any loops yourself.
strlen()returns the number of bytes in a string.strtolower()/strtoupper()change case.substr()extracts a portion of a string.str_replace()replaces all occurrences of a search value.
These four functions alone cover the majority of everyday string work.