PHP 7.1.5 Released

从PHP 5.5.x 移植到 PHP 5.6.x

Table of Contents

PHP 5.6 中大多数的改善对旧项目没有影响。有一些 不兼容处新功能 需要 注意下,并且在正式布署升级后的项目前应该测试您的代码。

参见 PHP 版本迁移指南 5.0.x5.1.x5.2.x5.3.x5.4.x5.5.x

add a note add a note

User Contributed Notes 1 note

offlinewan at gmail dot com
1 month ago
Plese notice that default POST data parsing has changed.
php 5.5 with "foo=bar&baz" received
  "foo" => "bar"
and php 5.6 with same input receives:
  "foo" => "bar",
  "baz" => ""

Tested via curl --data 'foo=bar&baz' http://localhost

It can create a problem when earlier json came without correct content-type header.
e.g. {"foo":"bar"} in php 5.5 $_POST was
and in php 5.6 will be
  "{\"foo\":\"\bar\"}" => ""

Tested via curl --data '{"foo":"bar"}' http://localhost
To Top