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
  • Get the string length strlen

    strlen

    Getthestringlength
  • Return part of the string substr

    substr

    Returnpartofthestrin
  • Check if the string begins with the given substring str_starts_with

    str_starts_with

    Checkifthestringbegi
  • Convert the first byte of the string to a value between 0-255 ord

    ord

    Convertthefirstbyteo
  • String comparison using the "natural order" algorithm strnatcmp

    strnatcmp

    Stringcomparisonusin
  • Translate characters or replace substrings - convert specified characters strtr

    strtr

    Translatecharacterso
  • Calculate a string of crc32 polynomials crc32

    crc32

    Calculateastringofcr
  • Alias ​​of implode join

    join

    Alias​​ofimplode
Popular Articles