Home Backend Development PHP Tutorial PHP 版本讲解_PHP

PHP 版本讲解_PHP

Jun 01, 2016 pm 12:13 PM
php5 php version

PHP版本目前主要有分三支:PHP4/PHP5/PHP6
PHP4由于太古老、对OO支持不力已基本被淘汰,不用考虑PHP4。
PHP6由于基本没有生产线上的应用,还基本只是一款概念产品,很多功能已在PHP5.3上实现,所以暂不考虑PHP6。

PHP5的版本目前主要分三支:PHP5.2之前的版本、PHP5.2.x 和 PHP5.3.x
PHP5.2之前的版本不值得考虑,因为某些功能缺陷或者BUG。
主流PHP程序对PHP5.2.x的兼容性最好,而每次版本号的升级带来的都是安全性和稳定性的改善,所以宜挑选最新的版本。目前PHP5.2系列最新的是PHP5.2.17。
而如果产品是自己开发自己使用,PHP5.3在某些方面更具优势,在稳定性上更胜一筹,增加了很多PHP5.2所不具有的功能,比如内置php-fpm、更完善的垃圾回收算法、命名空间的引入、sqlite3的支持等等,是部署项目值得考虑的版本。目前PHP5.3系列最新的是PHP5.3.8。

面向windows的php有以下几个版本
windows版本下载地址:http://windows.php.net/download/
Installer:可执行的MSI格式安装包。
Zip:解压即可用。和install版无区别。建议选择Zip版。
Debug Pack:带调试的php包。

VC6与VC9是什么?
VC6就是legacy Visual Studio 6 compiler,就是使用这个编译器编译的。
VC9 就是 the Visual Studio 2008 compiler,就是用微软的VS编辑器编译的。
那我们如何选择下载哪个版本的PHP呢?
如果你是在windows下使用Apache+PHP的,请选择VC6版本。
如果你是在windows下使用IIS+PHP 的,请选择VC9版本。
提示:使用VC9版的时候需要有VC++2008的运行时环境(x86)。(x64)
提示:不要在apache下使用VC9的版本。
提示:php5.2官方只提供vc6的下载。
提示:php5.3官方提供了vc6和vc9的下载,但从php5.3.5之后只提供vc9版的下载。php5.3.5是最后一个带vc6版的。

TS和NTS是什么?
TS 指 Thread Safe,即线程安全,一般在IIS以ISAPI方式加载的时候选择这个版本。
NTS 指 Non Thread Safe,即非线程安全,一般在IIS以FastCGI方式运行的时候选择这个版本,具有更好的性能。
提示:从PHP 5.3.0 开始发布的Windows版已经不支持ISAPI模式了,下载的php压缩包中没有php5isapi.dll,所以推荐FastCGI方式运行PHP。

如何查看当前运行的PHP的版本?
一个很简单的办法就是phpinfo();
Thread Safety disabled是NTS,enabled是TS
Configure Command看到VC98字样的是VC6,Compiler标明 MSVC9 (Visual C++ 2008) 的是VC9

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)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
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)

What is the difference between php5 and php8 What is the difference between php5 and php8 Sep 25, 2023 pm 01:34 PM

The differences between php5 and php8 are in terms of performance, language structure, type system, error handling, asynchronous programming, standard library functions and security. Detailed introduction: 1. Performance improvement. Compared with PHP5, PHP8 has a huge improvement in performance. PHP8 introduces a JIT compiler, which can compile and optimize some high-frequency execution codes, thereby improving the running speed; 2. Improved language structure, PHP8 introduces some new language structures and functions. PHP8 supports named parameters, allowing developers to pass parameter names instead of parameter order, etc.

PHP version development history (1995-2022) PHP version development history (1995-2022) Jun 01, 2020 pm 01:59 PM

As a PHP learner and developer, how can I not understand its history? The following PHP Chinese website will lead PHP enthusiasts to review the various historical versions of PHP.

How to change port 80 in php5 How to change port 80 in php5 Jul 24, 2023 pm 04:57 PM

How to change port 80 in php5: 1. Edit the port number in the Apache server configuration file; 2. Edit the PHP configuration file to ensure that PHP works on the new port; 3. Restart the Apache server, and the PHP application will start running on the new port. run on the port.

How to solve the problem that php5 is not listening on port 9000 How to solve the problem that php5 is not listening on port 9000 Jul 10, 2023 pm 04:01 PM

Solution steps for php5 not listening to port 9000: 1. Check the PHP-FPM configuration file; 2. Restart the PHP-FPM service; 3. Turn off the firewall or configure port forwarding; 4. Check whether other processes occupy port 9000.

What is the difference between php7 and php5 syntax What is the difference between php7 and php5 syntax Jul 10, 2023 pm 03:25 PM

The syntax differences between php7 and php5 are: 1. PHP7 introduces strict type declarations, while the type of PHP5 variables is implicit; 2. PHP7 introduces support for scalar type declarations, but PHP5 does not; 3. PHP7 introduces NULL Merge operator, while PHP5 checks whether a variable exists and is not null, you need to use a conditional statement; 4. PHP7 adds a new comparison operator "<=>", but PHP5 does not; 5. PHP7 introduces a new feature anonymous class , while PHP5 does not.

Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching Mar 05, 2024 am 09:27 AM

Pagoda Panel is a powerful and easy-to-use server management panel that can help users easily manage websites, databases, FTP and other services. In the process of using the Pagoda Panel, sometimes you need to switch the PHP version to adapt to different website needs. This article will provide you with a simple guide for PHP version switching, and provide specific code examples to help readers quickly complete the PHP version switching operation. First, we need to log in to the Pagoda panel and enter the website settings page. Find the "Website" option in the left navigation bar and click

Pagoda Panel Operation Guide: Sharing PHP Version Switching Tips Pagoda Panel Operation Guide: Sharing PHP Version Switching Tips Mar 04, 2024 am 10:42 AM

BTPanel is a powerful and easy-to-use server management panel that can help users easily manage servers, websites, databases and other services. As a website developer or administrator, it is very important to master the skills of switching PHP versions in the Pagoda panel. In this article, we will share how to operate and switch PHP versions in the Pagoda panel, and provide specific code examples to help readers better master this skill. 1. Log in to the Pagoda panel. First, enter the server IP address or domain name in the browser, and add the Pagoda

What are the differences between the version of php7 and 5? What are the differences between the version of php7 and 5? Sep 15, 2023 pm 04:11 PM

The differences between the version of php7 and 5 include performance improvements, scalar type declarations, return value type declarations, exception handling improvements, anonymous classes, syntax improvements, new operators, enhanced error handling and the removal of some old features. Detailed introduction: 1. Performance improvement. PHP7 introduces a new Zend engine, named Zend Engine 3.0, which brings significant performance improvement. The performance of PHP7 is approximately twice that of PHP5, mainly through improved memory management. , optimized function calls and exception handling, enhanced garbage collection, etc.

See all articles