本文内容根据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;}
- Added \u{xxxxx} Unicode Codepoint Escape Syntax
可以直接使用这种方式输出unicode字符
phpecho "\u{1F602}"; // outputs
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