


Starting from PHP5.2.10 version (there are currently two versions of PHP5.2.10 and 5.3), there are two versions available, None-Thread Safe and Thread Safe. What are the differences between these two versions? As a user How should we choose? Juyou will tell you about it below.
Starting from PHP5.2.10 version (there are currently two versions of PHP5.2.10 and 5.3), there are two versions available, None-Thread Safe and Thread Safe. What are the differences between these two versions and what should users do? How to choose? Juyou will tell you about it below.
First understand it literally, None-Thread Safe means non-thread safety, no thread safety check is performed during execution; Thread Safe means thread safety, and thread safety check is performed during execution to prevent The CGI execution method of starting a new thread when there is a new request exhausts system resources.
Let’s look at the two execution methods of PHP: ISAPI and FastCGI. The FastCGI execution method uses a single thread to perform operations, so there is no need to perform thread safety checks. Removing the protection of thread safety checks can improve execution efficiency. Therefore, if FastCGI (whether paired with IIS 6 or IIS 7) is used to execute PHP, It is recommended to download and execute non-thread safe PHP (PHP binary files have two packaging methods: msi and zip, please download the zip package). The thread safety check is prepared for ISAPI PHP. Because many PHP modules are not thread safe, you need to use Thread Safe PHP.
At this point, everyone should know how to choose which version of PHP. None-Thread Safe or Thread Safe, which one will you choose?
The version of PHP under Windows is updated very quickly. The latest version is PHP7. The current Windows version can be downloaded from PHP official PHP For Windows (http://windows.php.net/download/). When downloading, There are four versions: VC9 x86 Non Thread Safe, VC9 x86 Thread Safe, VC6 x86 Non Thread Safe, and VC6 x86 Thread Safe. So what's the difference between these versions?
The VC9 version is compiled with legacy VS 2008, and the VC6 version is compiled with legacy VS6.
If you are using IIS+PHP under windows, you need to download the VC9 version.
If you are using Apache+PHP under windows, you need to download the VC6 version.
Non Thread Safe refers to non-thread safety, and Thread Safe refers to thread safety.
If you use ISAPI to run PHP, you must use the Thread Safe (thread safe) version; if you use FastCGI mode to run PHP, there is no need to use thread safety check, use None Thread Safe (NTS, non-thread safe) version can better improve efficiency.
In this way, how to choose the PHP version that suits you is easily solved. Go download the PHP that suits your system.
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });I hope this article on choosing tips for non-thread-safe and thread-safe versions of PHP can be helpful to you. If you find this website maintenance tutorial useful, don’t forget to recommend it to your friends! If you have good experience methods, you might as well share them with everyone: if everyone comes up with an experience, then we will all gain a bunch of additional experience from others.
The above introduces the selection skills of non-thread-safe and thread-safe versions of PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

在php中,可以使用substr()函数来读取字符串后几个字符,只需要将该函数的第二个参数设置为负值,第三个参数省略即可;语法为“substr(字符串,-n)”,表示读取从字符串结尾处向前数第n个字符开始,直到字符串结尾的全部字符。

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。

在PHP中,可以利用implode()函数的第一个参数来设置没有分隔符,该函数的第一个参数用于规定数组元素之间放置的内容,默认是空字符串,也可将第一个参数设置为空,语法为“implode(数组)”或者“implode("",数组)”。

转化方法:1、使用“mb_substr($url,stripos($url,"?")+1)”获取url的参数部分;2、使用“parse_str("参数部分",$arr)”将参数解析到变量中,并传入指定数组中,变量名转为键名,变量值转为键值。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
