Table of Contents

The strrev() function is an built-in function in PHP which is used to reverse strings.

Syntax:

strrev(string)
PHP

string – This parameter is required. It specifies the string to reverse.

Example:

<?phpecho strrev("PHP Tutorials!");     // Output: "!slairotuT PHP"?>
PHP