PHP For Windows 7.0 x64 Non Thread Safe 官方正式版
22MB / 12-10
PHP 5.6.8 for windows 官方版 (32/64bit)
21MB / 05-09
php 5.2.5 x64位 zip解壓版
13.8MB / 07-22
PHP 5.4.40 for windows 官方版(NTS/TS)
16MB / 05-09
PHP v5.2.17 非線程安全(Non Thead Safe) For Windows(fastci
10MB / 09-02
詳情介紹
PHP For Windows是一種新型的 CGI 程序編寫語言,易學(xué)易用,運行速度快,可以方便快捷地編寫出實用程序,本站提供的是thread-safe版php7.1.4下載地址,線程安全 與apache 搭配的環(huán)境使用,有需要的朋友們歡迎前來下載使用。
PHP7.1.4可同時運行于 Windows,Unix,Linux 平臺的Web后臺程序,內(nèi)置了對文件上傳,密碼認(rèn)證,Cookies 操作,郵件收發(fā),動態(tài) GIF 生成等功能,PHP 直接為很多數(shù)據(jù)庫提供原本的連接,包括Oracle,Sybase,Postgres,mysql,Informix,Dbase,Solid,access 等,完全支持ODBC接口,用戶更換平臺時,無需變換 PHP 代碼,可即拿即用。
PHP7.1
新特性
1.可為空(Nullable)類型
類型現(xiàn)在允許為空,當(dāng)啟用這個特性時,傳入的參數(shù)或者函數(shù)返回的結(jié)果要么是給定的類型,要么是 null ??梢酝ㄟ^在類型前面加上一個問號來使之成為可為空的。
function test(?string $name)
{
var_dump($name);
}
以上例程會輸出:
string(5) "tpunt"
NULL
Uncaught Error: Too few arguments to function test(), 0 passed in...
2.Void 函數(shù)
在PHP 7 中引入的其他返回值類型的基礎(chǔ)上,一個新的返回值類型void被引入。 返回值聲明為 void 類型的方法要么干脆省去 return 語句,要么使用一個空的 return 語句。 對于 void 函數(shù)來說,null 不是一個合法的返回值。
function swap(&$left, &$right) : void
{
if ($left === $right) {
return;
}
$tmp = $left;
$left = $right;
$right = $tmp;
}
$a = 1;
$b = 2;
var_dump(swap($a, $b), $a, $b);
以上例程會輸出:
null
int(2)
int(1)
試圖去獲取一個 void 方法的返回值會得到 null ,并且不會產(chǎn)生任何警告。這么做的原因是不想影響更高層次的方法。
3.短數(shù)組語法 Symmetric array destructuring
短數(shù)組語法([])現(xiàn)在可以用于將數(shù)組的值賦給一些變量(包括在foreach中)。 這種方式使從數(shù)組中提取值變得更為容易。
$data = [
['id' => 1, 'name' => 'Tom'],
['id' => 2, 'name' => 'Fred'],
];
while (['id' => $id, 'name' => $name] = $data) {
// logic here with $id and $name
}
4.類常量可見性
現(xiàn)在起支持設(shè)置類常量的可見性。
class ConstDemo
{
const PUBLIC_CONST_A = 1;
public const PUBLIC_CONST_B = 2;
protected const PROTECTED_CONST = 3;
private const PRIVATE_CONST = 4;
}
5.iterable 偽類
現(xiàn)在引入了一個新的被稱為iterable的偽類 (與callable類似)。 這可以被用在參數(shù)或者返回值類型中,它代表接受數(shù)組或者實現(xiàn)了Traversable接口的對象。 至于子類,當(dāng)用作參數(shù)時,子類可以收緊父類的iterable類型到array 或一個實現(xiàn)了Traversable的對象。對于返回值,子類可以拓寬父類的 array或?qū)ο蠓祷刂殿愋偷絠terable。
function iterator(iterable $iter)
{
foreach ($iter as $val) {
//
}
}
6.多異常捕獲處理
一個catch語句塊現(xiàn)在可以通過管道字符(|)來實現(xiàn)多個異常的捕獲。 這對于需要同時處理來自不同類的不同異常時很有用。
try {
// some code
} catch (FirstException | SecondException $e) {
// handle first and second exceptions
} catch (\Exception $e) {
// ...
}
7.list()現(xiàn)在支持鍵名
現(xiàn)在list()支持在它內(nèi)部去指定鍵名。這意味著它可以將任意類型的數(shù)組 都賦值給一些變量(與短數(shù)組語法類似)
$data = [
['id' => 1, 'name' => 'Tom'],
['id' => 2, 'name' => 'Fred'],
];
while (list('id' => $id, 'name' => $name) = $data) {
// logic here with $id and $name
}
8.支持為負(fù)的字符串偏移量
現(xiàn)在所有接偏移量的內(nèi)置的基于字符串的函數(shù)都支持接受負(fù)數(shù)作為偏移量,包括數(shù)組解引用操作符([]).
var_dump("abcdef"[-2]);
var_dump(strpos("aabbcc", "b", -3));
以上例程會輸出:
string (1) "e"
int(3)
9.ext/openssl 支持 AEAD
通過給openssl_encrypt()和openssl_decrypt() 添加額外參數(shù),現(xiàn)在支持了AEAD (模式 GCM and CCM)。
通過 Closure::fromCallable() 將callables轉(zhuǎn)為閉包
Closure新增了一個靜態(tài)方法,用于將callable快速地 轉(zhuǎn)為一個Closure 對象。
class Test
{
public function exposeFunction()
{
return Closure::fromCallable([$this, 'privateFunction']);
}
private function privateFunction($param)
{
var_dump($param);
}
}
$privFunc = (new Test)->exposeFunction();
$privFunc('some value');
以上例程會輸出:
string(10) "some value"
1
1
10.異步信號處理 Asynchronous signal handling
A new function called pcntl_async_signals() has been introduced to enable asynchronous signal handling without using ticks (which introduce a lot of overhead).
增加了一個新函數(shù) pcntl_async_signals()來處理異步信號,不需要再使用ticks(它會增加占用資源)
pcntl_async_signals(true); // turn on async signals
pcntl_signal(SIGHUP, function($sig) {
echo "SIGHUP\n";
});
posix_kill(posix_getpid(), SIGHUP);
以上例程會輸出:
SIGHUP
11.HTTP/2 服務(wù)器推送支持 ext/curl
Support for server push has been added to the CURL extension (requires version 7.46 and above). This can be leveraged through the curl_multi_setopt() function with the new CURLMOPT_PUSHFUNCTION constant. The constants CURL_PUST_OK and CURL_PUSH_DENY have also been added so that the execution of the server push callback can either be approved or denied.
蹩腳英語:
對于服務(wù)器推送支持添加到curl擴(kuò)展(需要7.46及以上版本)。
可以通過用新的CURLMOPT_PUSHFUNCTION常量 讓curl_multi_setopt()函數(shù)使用。
也增加了常量CURL_PUST_OK和CURL_PUSH_DENY,可以批準(zhǔn)或拒絕 服務(wù)器推送回調(diào)的執(zhí)行
不兼容性
1.當(dāng)傳遞參數(shù)過少時將拋出錯誤
在過去如果我們調(diào)用一個用戶定義的函數(shù)時,提供的參數(shù)不足,那么將會產(chǎn)生一個警告(warning)。 現(xiàn)在,這個警告被提升為一個錯誤異常(Error exception)。這個變更僅對用戶定義的函數(shù)生效, 并不包含內(nèi)置函數(shù)。例如:
function test($param){}
test();
輸出:
Uncaught Error: Too few arguments to function test(), 0 passed in %s on line %d and exactly 1 expected in %s:%d
2.禁止動態(tài)調(diào)用函數(shù)
禁止動態(tài)調(diào)用函數(shù)如下
assert() - with a string as the first argument
compact()
extract()
func_get_args()
func_get_arg()
func_num_args()
get_defined_vars()
mb_parse_str() - with one arg
parse_str() - with one arg
(function () {
'func_num_args'();
})();
輸出
Warning: Cannot call func_num_args() dynamically in %s on line %d
3.無效的類,接口,trait名稱命名
以下名稱不能用于 類,接口或trait 名稱命名:
void
iterable
4.Numerical string conversions now respect scientific notation
Integer operations and conversions on numerical strings now respect scientific notation. This also includes the (int) cast operation, and the following functions: intval() (where the base is 10), settype(), decbin(), decoct(), and dechex().
5.mt_rand 算法修復(fù)
mt_rand() will now default to using the fixed version of the Mersenne Twister algorithm. If deterministic output from mt_srand() was relied upon, then the MT_RAND_PHP with the ability to preserve the old (incorrect) implementation via an additional optional second parameter to mt_srand().
6.rand() 別名 mt_rand() 和 srand() 別名 mt_srand()
rand() and srand() have now been made aliases to mt_rand() and mt_srand(), respectively. This means that the output for the following functions have changes: rand(), shuffle(), str_shuffle(), and array_rand().
7.Disallow the ASCII delete control character in identifiers
The ASCII delete control character (0x7F) can no longer be used in identifiers that are not quoted.
8.error_log changes with syslog value
If the error_log ini setting is set to syslog, the PHP error levels are mapped to the syslog error levels. This brings finer differentiation in the error logs in contrary to the previous approach where all the errors are logged with the notice level only.
9.在不完整的對象上不再調(diào)用析構(gòu)方法
析構(gòu)方法在一個不完整的對象(例如在構(gòu)造方法中拋出一個異常)上將不再會被調(diào)用
10.call_user_func()不再支持對傳址的函數(shù)的調(diào)用
call_user_func() 現(xiàn)在在調(diào)用一個以引用作為參數(shù)的函數(shù)時將始終失敗。
11.字符串不再支持空索引操作符 The empty index operator is not supported for strings anymore
對字符串使用一個空索引操作符(例如str[]=x)將會拋出一個致命錯誤, 而不是靜默地將其轉(zhuǎn)為一個數(shù)組
12.ini配置項移除
下列ini配置項已經(jīng)被移除:
session.entropy_file
session.entropy_length
session.hash_function
session.hash_bits_per_character
PHP 7.1.x 中廢棄的特性
1.ext/mcrypt
mcrypt 擴(kuò)展已經(jīng)過時了大約10年,并且用起來很復(fù)雜。因此它被廢棄并且被 OpenSSL 所取代。 從PHP 7.2起它將被從核心代碼中移除并且移到PECL中。
2.mb_ereg_replace()和mb_eregi_replace()的Eval選項
對于mb_ereg_replace()和mb_eregi_replace()的 e模式修飾符現(xiàn)在已被廢棄
從 PHP 7.0 升級到 PHP 7.1步驟
在 PHP 7.0 發(fā)布一年之后,終于看到 PHP 7.1 穩(wěn)定版發(fā)布,有不少新特性,迫不及待地想嘗試一下這個版本。本文是介紹從 PHP 7.0 升級到 PHP 7.1
首先下載源碼,我一般都是放在 /usr/local/src 中
[root@lnmp lnmp.cn]# cd /usr/local/src
[root@lnmp src]# wget -c //cn2.php.net/get/php-7.1.0.tar.gz/from/this/mirror -O php-7.1.0.tar.gz
然后解壓并進(jìn)入解壓后的源碼目錄
[root@lnmp src]# tar -zxvf php-7.1.0.tar.gz
[root@lnmp src]# cd php-7.1.0/
安裝前要先備份一下 php 7.0 的版本,這很重重重要
[root@lnmp php-7.1.0]# mv /usr/local/php7 /usr/local/php7.0
接下來開始安裝了,可以先關(guān)閉 php-fpm, 也可以不關(guān)閉,其實沒有關(guān)系。
既然是升級,為了不影響現(xiàn)有網(wǎng)站在升級后的正常運行,那就要做到升級后的 configure 和之前的版本基本一致。這就要把之前安裝 PHP 的 configure 找出來,如果你忘記了之前的 configure (應(yīng)該也沒有人去記它吧),其實它就在 phpinfo 里邊
[root@lnmp php-7.1.0]# php -i | grep configure
Configure Command => './configure' '--prefix=/usr/local/php7' '--enable-fpm' '--with-fpm-user=nginx' '--with-fpm-group=nginx' '--with-mysqli' '--with-zlib' '--with-curl' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-freetype-dir' '--with-openssl' '--enable-mbstring' '--enable-xml' '--enable-session' '--enable-ftp' '--enable-pdo' '-enable-tokenizer' '--enable-zip'
稍作替換就可以得到想要的 configure 命令了
[root@lnmp php-7.1.0]# php -i | grep configure | sed -e "s/Configure Command => //; s/'//g"
./configure --prefix=/usr/local/php7 --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-mysqli --with-zlib --with-curl --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-openssl --enable-mbstring --enable-xml --enable-session --enable-ftp --enable-pdo -enable-tokenizer --enable-zip
[root@lnmp php-7.1.0]#
這個這里要特別提到一下就是,如果之前的 PHP 版本在安裝后有用 PECL 或 phpize 新增過擴(kuò)展的話,如果這些擴(kuò)展可以加到 configure 里邊,盡量加,否則安裝后還要重新安裝一次這些擴(kuò)展
開始安裝
[root@lnmp php-7.1.0]# ./configure --prefix=/usr/local/php7 --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-mysqli --with-zlib --with-curl --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-openssl --enable-mbstring --enable-xml --enable-session --enable-ftp --enable-pdo -enable-tokenizer --enable-zip
如果成功的話,可以看到有 Thank you for using PHP. 的字樣
接著 make
[root@lnmp php-7.1.0]# make
視機(jī)子配置不同,編譯可能會要點時間。最后是
[root@lnmp php-7.1.0]# make install
至此,PHP 7.1 已經(jīng)安裝基本完成
[root@lnmp php-7.1.0]# php -v
PHP 7.1.0 (cli) (built: Dec 5 2016 04:09:57) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
[root@lnmp php-7.1.0]#
下面是配置,為了不影響現(xiàn)有網(wǎng)站的運行,這里將沿用 PHP 7.0 的配置,直接從備份的文件夾拷貝過去
[root@lnmp php-7.1.0]# cp /usr/local/php7.0/lib/php.ini /usr/local/php7/lib/php.ini
[root@lnmp php-7.1.0]# cp /usr/local/php7.0/etc/php-fpm.conf /usr/local/php7/etc/php-fpm.conf
[root@lnmp php-7.1.0]# cp /usr/local/php7.0/etc/php-fpm.d/www.conf /usr/local/php7/etc/php-fpm.d/www.conf
之前有特別提到有用 PECL 或 phpize 新增過擴(kuò)展的話,因為拷貝過來的 php.ini 中已經(jīng)引入了那些擴(kuò)展,在這里要重新安裝,否則在重啟 php-fpm 時會出現(xiàn)類似警報:
Dec 05 04:18:53 localhost.localdomain php-fpm[11533]: [05-Dec-2016 04:18:53] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/memcached.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
是要重新安裝,即便從舊版本中將這些 so 文件拷貝過來也不行,否則會出現(xiàn)不匹配的警告:
Dec 05 05:07:42 localhost.localdomain php-fpm[11672]: [05-Dec-2016 05:07:42] NOTICE: PHP message: PHP Warning: PHP Startup: memcache: Unable to initialize module
如果已經(jīng)忘記過安裝過什么擴(kuò)展,可以查看 php.ini 或擴(kuò)展目錄:
[root@lnmp no-debug-non-zts-20151012]# /usr/local/php7.0/bin/php-config --extension-dir
/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012
因為舊版本的文件夾已經(jīng)改名,這里同樣要改成 7.0
[root@lnmp php-7.1.0]# ls /usr/local/php7.0/lib/php/extensions/no-debug-non-zts-20151012
memcache.so memcached.so opcache.a opcache.so pdo_mysql.so
其中 opcache.a opcache.so 是自帶的,其他都是新增的。其他擴(kuò)展之前怎么安裝,現(xiàn)在又怎么重新安裝一遍吧,這里不再累述。
好了之后重新啟動 php-fpm
[root@lnmp php-7.1.0]# systemctl restart php-fpm
查看狀態(tài)
[root@lnmp php-7.1.0]# systemctl status php-fpm -l
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2016-12-05 05:31:22 UTC; 9s ago
Main PID: 17367 (php-fpm)
CGroup: /system.slice/php-fpm.service
├─17367 php-fpm: master process (/usr/local/php7/etc/php-fpm.conf)
├─17368 php-fpm: pool www
└─17369 php-fpm: pool www
已經(jīng)正常運行,測試下 phpinfo 頁面
友情提示:
Zip [23.38MB]
sha256: 1ee487ac01b59f316e3d590c6a8b354cd538bb9ff5c411af1a484819174f21f1
下載地址
人氣軟件
phpstudy vc9-vc14運行庫(PHP運行環(huán)境包) 免費安裝版 64位
WAMP5 v2.1e php運行環(huán)境 win32(apache+php)
Windows 7/Vista/2008的IIS自動安裝腳本(IIS7.0/7.5)
iis 6.0 for Win2003 64位完整IIS安裝包
PHP5 For Windows nts VC11-x86 v5.5.24 官方最新版
PHP For Windows 7.1.4 64位 Thread Safe 官方正式版
AppServ(集成了PHP 6.0 MYSQL 6.0等) v8.6.0 英文安裝版 附安裝
東方通 TongWeb 7.0.4 64位企業(yè)版(Linux/Windows系統(tǒng)雙安裝包)
OpenLDAP for Windows v2.4.40 官方安裝免費版(附安裝配置教程)
西部數(shù)碼網(wǎng)站管理助手 V3.1 服務(wù)器軟件安裝工具(Win2008 64位+II
相關(guān)文章
-
PhpWebStudy(Web服務(wù)器和環(huán)境管理器) v4.5.1 安裝免費版
PhpWebStudy是一個集Web服務(wù)器/數(shù)據(jù)庫服務(wù)器/PHP環(huán)境于一體的GUI應(yīng)用程序,支持macOS、Windows和Linux,歡迎需要的朋友下載使用...
-
守望簡單web服務(wù)器 v1.0 綠色免費版
守望小型web服務(wù)器是用c語言開發(fā)的一款功能強(qiáng)大實用的服務(wù)器功能,用于局域網(wǎng),互相點對點傳送文件,建立臨時WEB服務(wù)器,供大家臨時下載文件等,歡迎需要的朋友下載使用...
-
Diafaan SMS Server v4.8.0 Full Edition 完整激活破解版(附安裝教程)
Diafaan SMS Server 是一個強(qiáng)大的SMS平臺,適用于3G / GSM / CDMA調(diào)制解調(diào)器,HTTPSMS服務(wù)和SMPP帳戶。此版本對3G / GSM調(diào)制解調(diào)器,SMPP帳戶或基于HTTP的SMS服務(wù)的數(shù)量沒...
-
phpEnv 專業(yè)優(yōu)雅強(qiáng)大的PHP集成環(huán)境 v8.6.0
運行在Windows系統(tǒng)上的綠色的PHP集成環(huán)境,集成了Apache、Nginx等Web組件。支持不同PHP版本共存,支持自定義PHP版本,自定義MySQL版本...
-
xampp v8.1.6 for Windows(PHP環(huán)境搭建套件) 多國語言綠色版
XAMPP是一個易于安裝且包含MySQL、PHP和Perl的建站集成軟件包。XAMPP軟件操作簡單,功能強(qiáng)大,我們只需要在本站下載解壓后就可以安裝使用...
-
東方通 TongWeb 7.0.4 64位企業(yè)版(Linux/Windows系統(tǒng)雙安裝包)
TongWeb是一個自主、標(biāo)準(zhǔn)、安全的JavaEE應(yīng)用服務(wù)器,通過JavaEE規(guī)范兼容性認(rèn)證,豐富的增值特性功能。作為滿足上述需求的中間件平臺,廣泛地應(yīng)用于電信、金融、政府、交通...
下載聲明
☉ 解壓密碼:www.dbjr.com.cn 就是本站主域名,希望大家看清楚,[ 分享碼的獲取方法 ]可以參考這篇文章
☉ 推薦使用 [ 迅雷 ] 下載,使用 [ WinRAR v5 ] 以上版本解壓本站軟件。
☉ 如果這個軟件總是不能下載的請在評論中留言,我們會盡快修復(fù),謝謝!
☉ 下載本站資源,如果服務(wù)器暫不能下載請過一段時間重試!或者多試試幾個下載地址
☉ 如果遇到什么問題,請評論留言,我們定會解決問題,謝謝大家支持!
☉ 本站提供的一些商業(yè)軟件是供學(xué)習(xí)研究之用,如用于商業(yè)用途,請購買正版。
☉ 本站提供的PHP For Windows 7.1.4 64位 Thread Safe 官方正式版資源來源互聯(lián)網(wǎng),版權(quán)歸該下載資源的合法擁有者所有。