Current Location: Home> Function Categories> strrev

strrev

Reverse a string
Name:strrev
Category:String
Programming Language:php
One-line Description:Invert the string.

Definition and usage

strrev() function inverts the string.

Example

Invert the string "I love Shanghai!":

 <?php
echo strrev ( "I love Shanghai!" ) ;
?>

Try it yourself

grammar

 strrev ( string )
parameter describe
string Required. Specifies the string to be reversed.
Similar Functions
  • Remove spaces (or other characters) from the beginning of the string ltrim

    ltrim

    Removespaces(orother
  • Output formatted string printf

    printf

    Outputformattedstrin
  • Calculate the md5 hash value of a string md5

    md5

    Calculatethemd5hashv
  • Convert the first letter of each word in the string to uppercase ucwords

    ucwords

    Convertthefirstlette
  • Write the formatted string to the stream fprintf

    fprintf

    Writetheformattedstr
  • Returns the formatted string sprintf

    sprintf

    Returnstheformatteds
  • Returns information about the characters used in the string - counts the number of times each byte value (0..255) occurs in a string count_chars

    count_chars

    Returnsinformationab
  • Substrings that replace strings substr_replace

    substr_replace

    Substringsthatreplac
Popular Articles