Debian 使用 Testing 的話, PHP 就會自動升級到 5.6 版, 然後也會看到下述說明:
php5 (5.6.0~alpha1+dfsg-1) experimental; urgency=medium
* THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!
* PHP 5.6.0alpha1 comes with new features such as (incomplete list) :
+ constant scalar expressions,
+ variadic functions,
+ argument unpacking,
+ support for large(>2GiB) file uploads,
+ SSL/TLS improvements,
+ a new command line debugger called phpdbg.-- Ondřej Surý <[email protected]> Tue, 28 Jan 2014 11:02:20 +0100
PHP 5.6 預設編碼 UTF-8 設定
不過升級 PHP 5.6 都沒什麼問題, 只是如果手上有老舊網站, 還是 Big5 編碼的話, php.ini 裡面有個設定會造成網站炸掉~
PHP 5.6 後, php.ini 裡面會多個下述設定:
default_charset = "UTF-8"
若還有編碼非 UTF-8 的, 就自己於程式裡面加上下述
<?php ini_set('default_charset', 'Big5'); ?>
長期來說, 能轉換盡量轉換成 UTF-8 吧~ 🙂
相關網頁
- PHP: Migrating from PHP 5.5.x to PHP 5.6.x - Manual
- PHP: OpenSSL changes in PHP 5.6.x - Manual
- PHP 5.5: New Functions - Manual - PHP 5.5 增加很多 Function
- PHP: cli_set_process_title - Manual - Process 可以給名字了~