Home > Backend Development > PHP Tutorial > PHP7变化介绍

PHP7变化介绍

WBOY
Release: 2016-06-23 13:32:22
Original
1200 people have browsed it

本文内容根据PHP发布时的 new files 而来,链接地址 : PHP 7 new

特性一览

  • Added ?? operator
  • Added operato
    新的操作符
php// PHP 7之前的写法:比较两个数的大小function order_func($a, $b) {    return ($a < $b) ? -1 : (($a > $b) ? 1 : 0);}// PHP新增的操作符 <=>,perfectfunction order_func($a, $b) {    return $a <=> $b;}
Copy after login
  • Added \u{xxxxx} Unicode Codepoint Escape Syntax
    可以直接使用这种方式输出unicode字符
phpecho "\u{1F602}"; // outputs                 
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template