Home  >  Article  >  Backend Development  >  Detailed explanation of PHP540 version ChangeLog (Part 1)

Detailed explanation of PHP540 version ChangeLog (Part 1)

WBOY
WBOYOriginal
2016-08-08 09:23:061120browse

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

  • PHP5.4.0
  • PHP5.5.0
  • PHP5.6.0

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

  • 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.
autoconf

PHP requires dependent software when compiling and installing, so the supporting software for the new version must be replaced with the latest to ensure performance~

Removed legacy features Removed features

Original text

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 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.
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 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
Removed break/continue $var syntax

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 file
  • PHP’s safe mode was established to try to solve the security problem of shared-server. Structurally, it makes no sense to try to solve this problem on the PHP layer, but modifying the web server layer and operating system layer seems very unrealistic. So many people, especially ISPs, currently use safe mode.
  • The development of language is constantly improving, and it is also a process of continuous trial and error correction. ^_^

Security 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

    References
  • http://php.net/manual/zh/features.safe-mode.php

register_globals and register_long_arrays ini options.

These two configuration items have been removed due to performance concerns.

References

  • http://php.net/manual/zh/ini.core.php#ini.register-globals

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php array function (3)Next article:php array function (3)