{"id":276983,"date":"2016-03-25T18:33:02","date_gmt":"2016-03-25T15:33:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276983"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276983","title":{"rendered":"PHP 7. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441"},"content":{"rendered":"<p>       \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 PHP7. \u041d\u0435 \u0432\u0441\u0435, \u043d\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/296\/099\/648\/29609964874c1cc0fa58ea59f23ced52.png\" alt=\"php7\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PHP7<\/b><\/p>\n<p>  <a href=\"http:\/\/php.net\/downloads.php#v7\">\u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 PHP 7 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/a><br \/>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 PHP7 \u0438 \u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u2014 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 fedoraproject.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/b><\/p>\n<div class=\"spoiler_text\">CentOS\/RHEL 7.x:  <\/p>\n<pre><code class=\"bash\">rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm <\/code><\/pre>\n<p>  CentOS\/RHEL 6.x:  <\/p>\n<pre><code class=\"bash\">rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-6.noarch.rpm rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el6\/latest.rpm <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PHP 7 mod_php:  <\/p>\n<pre><code class=\"bash\">yum install php70w php70w-opcache <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PHP 7 php-fpm:  <\/p>\n<pre><code class=\"bash\">yum install php70w-fpm php70w-opcache <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <b>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/b><\/p>\n<p>  \u041e\u0434\u043d\u043e \u0438\u0437 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0445 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u044d\u0442\u043e \u00ab\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438\u00bb (<a href=\"https:\/\/wiki.php.net\/rfc\/uniform_variable_syntax\">Uniform Variable Syntax<\/a>).<\/p>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"php\">function get_something(){ return '555'; } $func_name = 'something';  \/\/ php 5 $func_name = 'get_'.$func_name; echo $func_name(); \/\/ 555<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438:<\/p>\n<p>  \/\/ php 7<br \/>  echo (&#8216;get_&#8217;.$func_name)(); \/\/ 555<\/p>\n<pre><code class=\"php\">$foo()['bar']() [$obj1, $obj2][0]-&gt;prop <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0441\u0442\u0430\u043d\u0435\u0442 \u0438\u043d\u0430\u0447\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<br \/>  \u0412 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u0438 \u044d\u0442\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439. \u0412\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"php\">$$foo['bar']['baz']; \/\/ \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434  \/\/ \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 php 5 \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 $foo['bar']['baz'] \/\/ \u0437\u0430\u0442\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 ${$foo['bar']['baz']};  \/\/ \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 php 7 \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 $foo \/\/ \u0437\u0430\u0442\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 ['bar']['baz'] ($$foo)['bar']['baz'];  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0447\u0438\u0442\u0430\u0442\u044c <b>\u00ab\u0441\u043b\u0435\u0432\u0430-\u043d\u0430\u043f\u0440\u0430\u0432\u043e\u00bb<\/b>, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443.<br \/>  \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"php\">$foo()['bar']() <\/code><\/pre>\n<p>  <b>\u042d\u0442\u043e \u043d\u0435\u043f\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e PHP 7.<\/b><\/p>\n<p>  \u0412\u043e \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443, \u043a\u0430\u043a \u0435\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c:<\/p>\n<pre><code class=\"php\">\/\/ php 5 $foo = array('bar' =&gt; array('baz' =&gt; 'ice')); $ice = '\u0425\u043e\u043b\u043e\u0434\u043d\u043e'; echo $$foo['bar']['baz'];  \/\/ php 7, \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b $foo = array('bar' =&gt; array('baz' =&gt; 'ice')); $ice = '\u0425\u043e\u043b\u043e\u0434\u043d\u043e'; echo ${$foo['bar']['baz']}; <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b<\/h4>\n<p>  <b>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &quot;??&quot;<\/b><\/p>\n<pre><code class=\"php\">\/\/ php 5 $var = isset($var)?$var:'0';  \/\/ php 7 $var = $var??'0'; <\/code><\/pre>\n<p>  <b>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0438\u043b\u0438 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435\u043c)<\/b><\/p>\n<p>  string, int, float, bool, array, callable, self (\u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u0430), parent (\u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u0430), Closure (\u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435), \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430<br \/>  \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u2014 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u00abUncaught TypeError\u00bb.<br \/>  \u041f\u0440\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0442\u0438\u043f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0442\u0438\u043f\u043e\u043c:<\/p>\n<pre><code class=\"php\">function return_array(): array{     return array('Hi!'); } <\/code><\/pre>\n<p>  <b>\u0422\u0438\u043f\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (string, int, float, bool)<\/b><\/p>\n<pre><code class=\"php\">\/\/ php 7 function echo_number(int $number){ \techo $number; }  echo_number(123); \/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 123 echo_number('text'); \/\/ \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 strict \u0432\u044b\u043a\u0438\u043d\u0435\u0442 \u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: Uncaught TypeError: Argument 1 passed to echo_number()  <\/code><\/pre>\n<p>  <b>\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438: `int`, `string`, `float`,`bool`<\/b><br \/>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0442\u0438\u043f\u044b \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<p>  <b>\u0410\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/b><\/p>\n<pre><code class=\"php\">$newClass = new class{     function who_i(){ echo '\u042f \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430'; } };  echo $newClass-&gt;who_i(); <\/code><\/pre>\n<p>  <b>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u044e\u043d\u0438\u043a\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439<\/b>  <\/p>\n<pre><code class=\"php\">echo &quot;\\u{1F427}&quot;; \/\/ \u043f\u0438\u043d\u0433\u0432\u0438\u043d, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u044b\u0435 <\/code><\/pre>\n<p>  <b>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439 `use`<\/b><\/p>\n<pre><code class=\"php\">\/\/ php 5 use some\\namespace\\ClassA; use some\\namespace\\ClassB as B;   use function some\\namespace\\fn_a; use function some\\namespace\\fn_b;   use const some\\namespace\\ConstA; use const some\\namespace\\ConstB;   \/\/ php 7  use some\\namespace\\{ClassA, ClassB as B}; use function some\\namespace\\{fn_a, fn_b}; use const some\\namespace\\{ConstA, ConstB}; <\/code><\/pre>\n<p>  <b>\u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 intdiv()<\/b><\/p>\n<pre><code class=\"php\">echo intdiv(7, 2); \/\/ 3 <\/code><\/pre>\n<p>  <b>\u041e\u0431\u0435\u0449\u0430\u044e\u0442 \u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u043e\u0432\u043e\u043c\u0443 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u043c\u0443 \u043a\u043e\u0434\u0443<\/b>               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/278273\/\"> https:\/\/habrahabr.ru\/post\/278273\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 PHP7. \u041d\u0435 \u0432\u0441\u0435, \u043d\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/296\/099\/648\/29609964874c1cc0fa58ea59f23ced52.png\" alt=\"php7\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-276983","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=276983"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276983\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}