微信号:zzp_PHP

介绍:PHP菜鸟训练营是一个专门为PHP初学者提供入门学习帮助的平台,这里是初学者的修行圣地,提供各种入门宝典,提供各种升级丹药,坚持三个疗程就能找到好工作,升职加薪,迎娶白富美走上人生巅峰!在这里我们希望帮...

PHP 7.1.0 正式发布,这些新特性必看!

2016-12-07 11:36 兄弟连二姐

PHP 7.1.0 正式发布,有大量改进和新特性,可空类型、list 的方括号简写、void 返回类型 等等,本文二姐为大家做了整理,快来看看吧:

  • Session ID without hashing 
    Remove hash usage from session ID generation. (Created 2016-04-06)

  • Asynchronous Signal Handling 
    Asynchronous Signal Handling without TICKs and any additional overhead. (Created 2016-06-24)

  • Fix inconsistent behavior of $this variable 
    Fix all known inconsistencies related to special variable $this (Discussion began 2016-05-23)

  • 删除 "Missing argument" 警告,改成 "Too few arguments" 异常 
    (Created 2016-06-01)

  • Nullable Types(可空类型) 
    Allow a type check to be of some type or null (Discussion began 2016-04-13)

  • Square bracket syntax for array destructuring assignment 
    An alternative syntax to 
    list() (Created 2016-04-07)

  • Warn about invalid strings in arithmetic 
    Produce E_NOTICE or E_WARNING when using invalid numeric strings with arithmetic operators (Created 2016-01-08)

  • Allow specifying keys in list() 
    Adds syntax to help unpacking associative arrays into variables (Created 2016-01-17)

  • Iterable 
    Iterable pseudo-type accepting arrays or objects implementing Traversable (Created 2016-06-10)

  • Generalize support of negative string offsets 
    Add support for negative string offsets everywhere it makes sense (Created 2016-01-23)

  • Closure from callable function 
    Add a function to create closures from callables without reflection

  • Deprecate mb_ereg_replace eval option 
    This 
    RFC aims at deprecating the e option that mb_ereg_replace and mb_eregi_replace provide.

  • Deprecate (and remove) Mcrypt 
    Let's get rid of ext/mcrypt, which is abandonware and inhibits the growth of the language, as soon as humanly possible. (Created 2016-01-09)

  • OpenSSL AEAD support 
    Adds support for AEAD cipher modes (GCM and CCM) to openssl_decrypt and openssl_encrypt.

  • Void Return Type 
    Adds a void return type to require that a function does not return a value. (Revived 2015-10-04, originally created 2015-02-14)

  • Class constant visibility modifiers 
    Introduce class constants visibility modifiers that mirror properties and methods. (Created 2015/09/13)

  • Octal Overflow Protection 
    Stop quietly ignoring overflows in octal number parsing (Created: 2016-04-12)

  • RNG fixes and changes 
    Fixes and improvements to the random number generation subsystems (Created 2016-06-14)

  • Add HTTP/2 Server Push support to ext/curl (Created 2015/10/01)

  • TimeZone::getWindowsID (Created (2016/03/15)

  • Multi catch 
    Catching multiple exception types in a single catch statement (Created 2016/03/06)

  • Forbid dynamic calls to scope introspection functions (Created 2016-05-01)

  • 增加 curl_multi_errno(), curl_share_errno() and curl_share_strerror() (Created: 2016-04-29)

  • Throw Error in Extensions 
    Convert E_ERROR and E_RECOVERABLE_ERROR to throw Error in extensions (Created 2016-06-14)

  • More precise float value handling 
    This 
    RFC proposes more precise float value handling.

  • Additional Context in pcntl_signal Handler 
    Adds a second array argument to 
    pcntl_signal handler (Created 2016-06-14)

  • 新增 session_create_id() 方法
    Add session_create_id() function (Created 2016-04-07)

  • 新增 Add session_gc() 方法
    Add session_gc() function (Created 2016-04-06)

本文只是简单摘录,详细信息需查看 PHP 官方 RFC :https://wiki.php.net/rfc#php_71

点击阅读原文,免费领取兄弟连原创教学视频——PHP学科视频




 
PHP菜鸟训练营 更多文章 初学者年薪10万必不可少的PHP学习技能 1分钟了解最抢手后端语言php! 【宝典】这些月薪过万的面试准备你做好了吗? php程序员遇到职业问题,离职还是坚持? 大神级的PHP程序员是如何炼成的?
猜您喜欢 机器学习--Apriori算法 完整版:资深程序员都了解的代码复用法则 javascript中的with关键字 每周阅读清单:自定义Toast,应用分析报告,老罗 [干货]基础机器学习算法