Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the commonly used PHP function code snippets?

Shulou Source: shulou.com Published: 2022-06-02 19:33:59 11月11日 Update

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)

Tags: Mail address character authentication code string function content data user e-mail function directory password mandatory file file download log article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Linux Docker Shulou Tech Info