Versions of PHP posture (updated 2017-02-15)

Source: Internet
Author: User
Tags glob safe mode script php wrappers

Today by P Master of the black magic shocked, I must have learned the fake PHP, think carefully, in fact, the PHP version of the update does not care how much, are living in 5.3 that version, but now are 7.0!
The other thing is that when you test your code many times, you also rely on version issues.

http://php.net/manual/zh/appendices.php

php5.2 ago

1, __autoload load class file, but can only call this function once, so you can use Spl_autoload_register load class

php5.3

1. Added glob://and phar://flow packaging
Glob used to list directories, bypassing Open_baedir
http://php.net/manual/zh/wrappers.phar.php

Phar can be used to bypass some of the suffix restrictions in file inclusion
http://php.net/manual/zh/wrappers.phar.php

2, the new global variable __dir__
3, default on <?= $xxoo;?> , 5.4 also available

php5.4

1. Remove Safe Mode, magic quotes
2, register_globals and register_long_arrays php.ini instructions were removed.
3, php.ini new session.upload_progress.enabled, the default is 1, can be used to file contains
http://php.net/manual/zh/session.configuration.php
http://php.net/manual/zh/session.upload-progress.php

php5.5

1. Abolition of Preg_replace's/E mode (not removed)
When the deprecated e modifier is used, the function escapes some characters (that is, ', ', \, and NULL) and then replaces it with a back reference.
http://php.net/manual/zh/function.preg-replace.php

php5.6

1. Use ... operator defines variable-length parameter functions
Http://php.net/manual/zh/functions.arguments.php#functions.variable-arg-list

php7.0

1. The hexadecimal string is no longer considered a number
2. Remove ASP and script PHP tags

<% %><%= %><script language="php"></script>

3, in the later version of the assert into a language structure, which will mean that a lot of words can not be used.
Currently tested, can be used there.

call_user_func(‘assert‘, ‘phpinfo();‘); 
php7.1

http://php.net/manual/zh/migration71.new-features.php
1. Abolition of the Eval options for Mb_ereg_replace () and Mb_eregi_replace ()

Versions of PHP posture (updated 2017-02-15)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.