Home Backend Development PHP Tutorial PHP生圆成球唯一码

PHP生圆成球唯一码

Jun 13, 2016 pm 12:53 PM
guid strtoupper substr

PHP生成全球唯一码

1

2

3

4

5

6

7

8

9

10

11

12

13

14

<?

  

function guid() {

    $charid = strtoupper(md5(uniqid(mt_rand(), true)));

    $uuid =

    substr($charid, 0, 8).

    substr($charid, 8, 4).

    substr($charid,12, 4).

    substr($charid,16, 4).

    substr($charid,20,12);

    return $uuid;

}

 echo strlen(guid());

?>

Copy after login

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Introduction to win11 hard disk format mbr or guid Introduction to win11 hard disk format mbr or guid Dec 27, 2023 am 11:59 AM

Many friends encounter situations where they need to manually modify the hard disk format when installing win11, but they don’t know whether the win11 hard drive format is mbr or guid. In fact, both partitions are possible, but the installation methods will be different. Let’s take a look at them together. Let’s introduce it in detail. Win11 hard disk format is mbr or guid: Answer: Win11 hard disk format is both mbr and guid. In fact, win11 can be installed using both mbr format and guid mode. However, there are some differences between the two formats in terms of installation and use. The difference between win11 hard disk format mbr and guid 1. Installation 1. If we use a USB flash drive, we must use the mbr format when installing win11 in the pe system. 2. If you use w

Which one should I choose between win7mbr and guid? Which one should I choose between win7mbr and guid? Dec 23, 2023 am 08:22 AM

win7mbr and guid are two formats for hard disk partitions. Many users don’t know which one to choose when building a system. In fact, it is best to choose according to the configuration of their own computer. Let’s take a look at the detailed introduction below. Which one to choose between win7mbr and guid: Answer: win7: MBR partition is recommended. Because Windows 7 does not support UEFI system installation by default, the hard disk cannot be recognized. win8 and win10: Both modes are available, guid is recommended. Introduction to win7mbr and guid: 0. GPT is the abbreviation of GUID partition table. 1. The installed UEFI system can only be booted through GPT disk. (The Windows installer can boot from the MBR's FAT32 partition, but only

PHP returns the ASCII value of the first character of the string PHP returns the ASCII value of the first character of the string Mar 21, 2024 am 11:01 AM

This article will explain in detail the ASCII value of the first character of the string returned by PHP. The editor thinks it is very practical, so I share it with you as a reference. I hope you can gain something after reading this article. PHP returns the ASCII value of the first character of a string Introduction In PHP, getting the ASCII value of the first character of a string is a common operation that involves basic knowledge of string processing and character encoding. ASCII values ​​are used to represent the numeric value of characters in computer systems and are critical for character comparison, data transmission and storage. The process of getting the ASCII value of the first character of a string involves the following steps: Get String: Determine the string for which you want to get the ASCII value. It can be a variable or a string constant

PHP returns the string from the start position to the end position of a string in another string PHP returns the string from the start position to the end position of a string in another string Mar 21, 2024 am 10:31 AM

This article will explain in detail how PHP returns the string from the start position to the end position of a string in another string. The editor thinks it is quite practical, so I share it with you as a reference. I hope you will finish reading this article. You can gain something from this article. Use the substr() function in PHP to extract substrings from a string. The substr() function can extract characters within a specified range from a string. The syntax is as follows: substr(string,start,length) where: string: the original string from which the substring is to be extracted. start: The index of the starting position of the substring (starting from 0). length (optional): The length of the substring. If not specified, then

Differences between MBR and GUID Partitioning: Comparison to Speed ​​Up the Partitioning Process Differences between MBR and GUID Partitioning: Comparison to Speed ​​Up the Partitioning Process Dec 26, 2023 pm 12:29 PM

When we install the system, we need to choose the correct partition format. Choosing the best format can make the computer run normally. Today, the editor has brought a detailed answer to the difference between partition MBR and GUID, so that we can better understand the computer. Let’s take a look below. Details of the difference between fast partition MBR and GUID MBR support conditions: 1. Supports up to 4 primary partitions. 2. Support hard disk partitions with a capacity of less than 2.2T. 3. Supports 32-bit and 64-bit versions below win7. 4. There must be an MBR boot sector and a primary partition. GUID support conditions: 1. Supports up to 128 primary partitions, no extended partitions and logical disks. 2. Support hard disk partitions with a capacity of 2.2T or above. 3. Support 64-bit systems of win7 and above

How to disable Windows 10 driver updates guide How to disable Windows 10 driver updates guide Jan 04, 2024 am 09:11 AM

Frequent driver updates will interfere with users' normal use. Only stable performance is the best, and the latest version may not be the best. Here is a guide to disabling driver updates. How to disable driver update guid in win101. First, press and hold "win" + "R" to call the "Run" command, enter "gpedit.msc" to open "Group Policy", 2. Then follow the following order to find, "Computer Configuration" → "Management" Template" → "System" → "Device Installation" → "Device Installation Restrictions", 3. Then find "Prevent the installation of devices using drivers that match the following device installation program classes" on the right, double-click to open, 4. Check " Enabled", click "Show", enter the "Class GUID" of the device and click "OK"

Understand the substr() function in PHP to intercept strings Understand the substr() function in PHP to intercept strings Nov 18, 2023 am 11:27 AM

Understand the substr() function in PHP for intercepting strings. In the PHP language, the substr() function is a very useful string processing function, which can be used to intercept string fragments at a specified position and length. The substr() function accepts three parameters: the string to be intercepted, the starting position of the interception, and the length of the interception. Below we will introduce the use of the substr() function in detail and give specific code examples. Basic usage of substr() function substr() function

Use the PHP function 'substr' to get the substring of a string Use the PHP function 'substr' to get the substring of a string Jul 24, 2023 pm 10:13 PM

Use the PHP function "substr" to obtain the substring of a string. In PHP programming, you often encounter situations where you need to obtain part of the content of a string. At this time, we can use PHP's built-in function "substr" to achieve this. This article explains how to use the "substr" function to get a substring of a string and provides some code examples. 1. Basic usage of the substr function The substr function is used to obtain a substring of a specified length from a string. Its basic syntax is as follows: substr(

See all articles