Because of the recent development requirements, after the password is MD5 encrypted, it involves the string interception of ciphertext. So I wrote this blog, I hope you support.
The constructed string
$str = "AJAFAFPAFFAFDFDFD";
echo "original string". $str. "";
$str 1 = substr ($STR, 5);
echo "starts at the end of the fifth character." $str 1. "";
$str 2 = substr ($str, 0,4);
echo "takes 4 characters starting from the No. 0 character:". $str 2. "";
$str 3 = substr ($str,-5);
echo "Take the last 5 characters:". $str 3. "";
$str 4 = substr ($str, -8,4);
echo "intercepts 4 characters starting from the 8th character:". $str 4. ";
$str 5 = substr ($str, -8,-2);
echo "intercepts 2 characters from the last 8th character:". $str 5. "";
?>
The above describes the PHP string commonly used interception operations, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.