Objective
With a large number of frames using composer and namespace, the gradual online environment has changed from the previous 5.3 to 5.4 or 5.5 or even 5.6, and with the release of the July PHP7, more companies will adopt the new version.
A long time ago to write such a piece of article, to explain the differences in the different versions, this is to take out the times.
This is the first article, currently planning to write three articles
- PHP5.4.0
- PHP5.5.0
- PHP5.6.0
On the one hand is the collation of their own knowledge, on the other hand is a promotion of their own.
Official notes
Official Document Address http://php.net/ChangeLog-5.php#5.4.0
Detailed description
Mar 2012
Original
- Autoconf 2.59+ is today supported (and required) for generating, the Configure script with./buildconf. Autoconf 2.60+ is desirable otherwise the Configure help order may incorrect.
Translation
Autoconf 2.59 + now supports (requires) generating configuration scripts/buildconf. Autoconf 2.60 + is an ideal configuration, otherwise it may not be correct.
Autoconf
PHP compile and install the need to rely on software, so the new version of the corresponding software should be replaced with the latest in terms of performance insurance AH ~
Removed legacy features removal characteristics
Original
- Break/continue $var syntax.
- Safe mode and all related INI options.
- Register_globals and Register_long_arrays INI options.
- Import_request_variables ().
- Allow_call_time_pass_reference.
- Define_syslog_variables INI option and its associated function.
- highlight.bg ini option.
- Session bug Compatibility Mode (session.bug_compat_42 and Session.bug_compat_warn ini options).
- Session_is_registered (), Session_register () and Session_unregister () functions.
- Y2k_compliance ini option.
- MAGIC_QUOTES_GPC, Magic_quotes_runtime and magic_quotes_sybase ini options. GET_MAGIC_QUOTES_GPC, Get_magic_quotes_runtime is kept but always return false, Set_magic_quotes_runtime raises an E_cor E_error.
- Removed support for putenv ("tz= ...") for setting the timezone.
- Removed the timezone guessing algorithm in case the timezone isn ' t set with Date.timezone or Date_default_timezone_set (). Instead of a guessed timezone, "UTC" is now used Instead.
Translation
- break/continue$ var syntax.
- Safe mode and all associated INI options.
- Register_globals and Register_long_arrays INI options.
- Import_request_variables ().
- Allow_call_time_pass_reference.
- The Define_syslog_variables INI option and its associated features.
- highlight.bg ini option.
- Session error compatibility Mode (SESSION.BUG_COMPAT_42 and Session.bug_compat_warn ini options).
- Session_is_registered (), Session_register (), and Session_unregister () functions.
- Y2k_compliance ini option.
- Magic_quotes_gpc,magic_quotes_runtime and Magic_quotes_sybase INI options. Get_magic_quotes_gpc,get_magic_quotes_runtime saves but always returns False,set_magic_quotes_runtime throws E_core_error.
- PUTENV is no longer supported ("TZ =..") ) to set the time zone.
- If you do not set the time zone with time zone Date.timezone or Date_default_timezone_set (), the guessing algorithm is removed. Instead of guessing the time zone, "UTC" is now used instead.
I take Baidu translation to come, I will talk nonsense? =_=
Break/continue
Removed break/continue $var syntax
Before 5.4, we could control the loop of jumping or stopping several layers by passing the following parameters, but after the 5.4.0 version, this feature was removed.
break$c;continue$c;
Break and continue accepts a number, which specify the number of nested loops, that should is breaked up, or continued.
Resources
- Http://stackoverflow.com/questions/6517401/what-is-the-break-continue-var-syntax-will-be-removed-in-php-5-4
- Http://php.net/control-structures.break
Safe mode and all related INI options. Removal of security mode and options in configuration files
PHP's security model was created to try to resolve the shared server (Shared-server) security issue. On the structure, it is unreasonable to try to solve this problem on the PHP layer, but it is very unrealistic to modify the Web server layer and the operating system layer. So many people, especially ISPs, currently use Safe mode.
The development of language is in continuous progress, ah, but also a constant trial and error to correct the process. ^_^
- Security measures and Safe mode, that is, removing all safe_mode-related configuration items from php.ini
- A function that is restricted or masked by Safe mode. In security restriction mode, some functions cannot be used. This restriction will also be removed
Resources
- http://php.net/manual/zh/features.safe-mode.php
Register_globals and Register_long_arrays INI options.
These two configuration items are removed because of the performance relationship.
Resources
- Http://php.net/manual/zh/ini.core.php#ini.register-globals
Import_request_variables ()
import_request_variables-Import Get/post/cookie variables into the global scope
BOOL Import_request_varia Bles (String t y p e s [ , s t r i n g
The above describes the PHP540 version changelog detailed (above), including aspects of the content, You want to be helpful to a friend who is interested in PHP tutorials.