What are the commonly used PHP function code snippets?
This article mainly introduces the commonly used PHP function code segments, the article is very detailed, has a certain reference value, interested friends must read it!
1. PHP readable random string
This code creates a readable string that is closer to the words in the dictionary, practical and password verification.
/ * * @ length-length of random string (must be a multiple of 2) * / function readable_random_string ($length = 6) {$conso=array ("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w" "x", "y", "z") $vocal=array ("a", "e", "I", "o", "u"); $password= ""; srand ((double) microtime () * 1000000); $max = $length/2; for ($iTun1; $I)