PHP strrev()Function

PHP String 参考手册PHP String Reference Manual

Examples

Reverse the string "Hello World!":

<?php
echo strrev("Hello World!");
?>

Run Example »

Definition and Usage

The strrev() function reverses a string.


Syntax

strrev(string)

Parameter Description
string Required. Specifies the string to be reversed.

Technical Details

Return value: Returns the reversed string.
PHP Version: 4+


PHP String 参考手册PHP String Reference Manual Other Extensions