Foreword
With a large number of frameworks using composer and namespace, the online environment has gradually changed from the previous 5.3 to 5.4 or 5.5 or even 5.6. With the release of PHP7 in July, more companies will adopt it. new version.
I have wanted to write an article like this for a long time to explain the differences between different versions, but I finally found the time this time.
This is the first article, and I currently plan to write three articles
On the one hand, it is to organize my own knowledge; A promotion.
Official description
Official document address http://php.net/ChangeLog-5.php#5.4.0
Detailed description
01 Mar 2012
Original text
autoconfPHP requires dependent software when compiling and installing, so the supporting software for the new version must be replaced with the latest to ensure performance~
- autoconf 2.59+ is now supported (and required) for generating the configure script with ./buildconf. Autoconf 2.60+ is desirable otherwise the configure help order may be incorrect. autoconf 2.60+ is the ideal configuration, otherwise it may be incorrect.
Original textRemoved legacy features Removed features
break/continue $var syntax.Safe mode and all related ini options.register_globals and register_long_arrays ini options.
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 in i 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 are kept but always return false, set_magic_quotes_runtime raises an E_CORE_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.
Removed break/continue $var syntaximport_request_variables().
- allow_call_time_pass_reference.
- define_syslog_variables INI options and their related functions.
- 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 save but always return false, set_magic_quotes_runtime raises e_core_error.
- putenv("TZ=..") setting time zone is no longer supported.
- If timezone is not set use date.timezone or date_default_timezone_set() to remove the guessing algorithm. Instead of guessing the time zone, "UTC" is now used instead.
- I used Baidu Translate, will I speak nonsense? =_=
- break/continue
Before 5.4, we could control jumping out or stopping several layers of loops by passing the following parameters. However, in version 5.4.0 Later, this feature was removed.
<code><span>break</span><span>$c</span>; <span>continue</span><span>$c</span>;</code>
break and continue accepts a number, that specify the number of nested loops, that should be broken up, or continued.
References
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. Remove the safe mode and options in the configuration fileSecurity measures and safe mode, that is, all safe_mode related configuration items in php.ini are removed
functions that are restricted or blocked by safe mode. In safe restricted mode, some functions cannot be used. This restriction will also be removed
register_globals and register_long_arrays ini options.
These two configuration items have been removed due to performance concerns.
References
import_request_variables()
import_request_variables — GET/POST/Cookie variables Imported into the global scope
bool import_request_variables ( string
types[ ,st ring The above introduces the detailed explanation of PHP540 version ChangeLog (Part 1), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.