The code for php string flipping is "strrev(string)", and the parameter string is used to specify the string to be flipped; if it is passed to a number instead of a string, it will also flip the number. The strrev() function does not make any changes to the original string passed to it as an argument.
The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
php string flip (Reverse)
<?php echo strrev("Hello World!"); ?>
Output:
!dlroW olleH
Description:
strrev() function Strings can be flipped (reversed). Grammar format:
strrev(string)
Parameter string: Specifies the string to be reversed and cannot be omitted. If you pass it a number instead of a string, it will also reverse the number.
Return value: Return the reversed string or number. It does not make any changes to the original string or number passed in the argument.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What is the code for php string flipping. For more information, please follow other related articles on the PHP Chinese website!