{"id":254797,"date":"2015-04-08T15:13:03","date_gmt":"2015-04-08T11:13:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=254797"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=254797","title":{"rendered":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0432 PHP"},"content":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 PHP 5 \u0432 2005 \u0433\u043e\u0434\u0443. \u0422\u043e\u0433\u0434\u0430 \u044f \u0435\u0449\u0451 \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u0437\u043d\u0430\u043b \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041f\u044f\u0442\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e PHP \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0439, \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0441\u0442\u0430\u043b\u0430 \u043d\u043e\u0432\u0430\u044f, \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f, \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0441\u043f\u0443\u0441\u0442\u044f, \u043e\u043a\u043e\u043b\u043e 90% \u0432\u0441\u0435\u0433\u043e PHP-\u043a\u043e\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 PHP 5.0. \u042d\u0442\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u0441\u044b\u0433\u0440\u0430\u043b\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043b\u0435\u0442. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0441\u0451 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c\u00bb. \u0427\u0442\u043e\u0431\u044b \u043b\u044e\u0434\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0438\u043d\u0430\u0447\u0435 \u2014 \u0438 \u043b\u0443\u0447\u0448\u0435, \u043f\u043e\u043b\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430. \u0422\u0430\u043a\u0436\u0435 \u044f \u0437\u0430\u0442\u0440\u043e\u043d\u0443 \u0442\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 (\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e).<\/p>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 PHP 5.4, \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043d\u043e\u0439 \u0432\u0435\u0449\u0438 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b \u0434\u043b\u044f 5.5 \u0438 5.6, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 5.3 \u0432\u0441\u0451 \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043e\u0431\u0449\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0412 PHP 7, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e, \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u043b\u0438\u0448\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0451 \u0438 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430 \u043b\u0443\u0447\u0448\u0435\u0435 \u2014 \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e. \u0411\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b userland-\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0435\u0447\u0438 \u043d\u0435 \u043f\u043e\u0439\u0434\u0451\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0447\u043d\u0443 \u0441 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432:<\/p>\n<pre><code class=\"php\">class Foo {     public $a = &quot;foobarstring&quot;;     public $b;     public $c = ['some', 'values']; }  for ($i=0; $i&lt;1000; $i++) {     $m = memory_get_usage();     ${'var'.$i} = new Foo;     echo memory_get_usage() - $m&quot;\\n&quot;; } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0442\u0440\u0435\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f 1000 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c: \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 Foo \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f 262 \u0431\u0430\u0439\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 PHP.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"php\">for ($i=0; $i&lt;1000; $i++) {     $m = memory_get_usage();     ${'var'.$i} = [['some', 'values'], null, 'foobarstring'];     echo memory_get_usage() - $m . &quot;\\n&quot;; } <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0435 \u0436\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b: \u0441\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432, null \u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>foobarstring<\/code>. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0436\u0435 1160 \u0431\u0430\u0439\u0442 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u0432 4,4 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"php\">$class = &lt;&lt;&lt;'CL' class Foo {     public $a = &quot;foobarstring&quot;;     public $b;     public $c = ['some', 'values']; } CL; echo memory_get_usage() . &quot;\\n&quot;; eval($class); echo memory_get_usage() . &quot;\\n&quot;; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043b\u0430\u0441\u0441 \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0442\u043e \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 PHP) \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>eval()<\/code>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f. \u041e\u0431\u044a\u0451\u043c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (diff memory) \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 2216 \u0431\u0430\u0439\u0442.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0432\u0441\u0451 \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 PHP, \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u0438\u0432 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f.<\/p>\n<h1>\u0412\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h1>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 PHP \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b zend_class_entry:<\/p>\n<pre><code class=\"cpp\">struct _zend_class_entry {     char type;     const char *name;     zend_uint name_length;     struct _zend_class_entry *parent;     int refcount;     zend_uint ce_flags;      HashTable function_table;     HashTable properties_info;     zval **default_properties_table;     zval **default_static_members_table;     zval **static_members_table;     HashTable constants_table;     int default_properties_count;     int default_static_members_count;      union _zend_function *constructor;     union _zend_function *destructor;     union _zend_function *clone;     union _zend_function *__get;     union _zend_function *__set;     union _zend_function *__unset;     union _zend_function *__isset;     union _zend_function *__call;     union _zend_function *__callstatic;     union _zend_function *__tostring;     union _zend_function *serialize_func;     union _zend_function *unserialize_func;      zend_class_iterator_funcs iterator_funcs;      \/* handlers *\/     zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC);     zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);     int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); \/* a class implements this interface *\/     union _zend_function *(*get_static_method)(zend_class_entry *ce, char* method, int method_len TSRMLS_DC);      \/* serializer callbacks *\/     int (*serialize)(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC);     int (*unserialize)(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC);      zend_class_entry **interfaces;     zend_uint num_interfaces;      zend_class_entry **traits;     zend_uint num_traits;     zend_trait_alias **trait_aliases;     zend_trait_precedence **trait_precedences;      union {         struct {             const char *filename;             zend_uint line_start;             zend_uint line_end;             const char *doc_comment;             zend_uint doc_comment_len;         } user;         struct {             const struct _zend_function_entry *builtin_functions;             struct _zend_module_entry *module;         } internal;     } info; }; <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 LP64, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <b>568 \u0431\u0430\u0439\u0442<\/b>. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 PHP \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441, \u043e\u043d \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <code>zend_class_entry<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u0435\u043b\u043e \u044d\u0442\u0438\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f: \u043a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043a\u043b\u0430\u0441\u0441\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u0412\u0441\u0451 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043d\u043e \u043e\u0434\u043d\u043e \u0432\u0435\u0440\u043d\u043e: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0435\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0435\u0433\u043e <code>OPArray<\/code>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u043d \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u043c\u0435\u0442\u043e\u0434\u0435. \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0443\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043f\u043e\u0437\u0436\u0435 \u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u0431\u044a\u0451\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0439\u043c\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0430 \u0432\u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u044a\u0435\u0441\u0442 \u043d\u0435\u043c\u0430\u043b\u043e \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u043c \u0441 <code>zend_class_entry<\/code> \u2014 \u043e PHP-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u0430\u043a \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 (\u0432 \u044f\u0437\u044b\u043a\u0435 \u0421 \u2014 \u0431\u0443\u0444\u0435\u0440\u044b <code>char*<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044f\u0437\u044b\u043a\u0430 \u0421, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e Unicode, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 PHP, \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435: \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b = \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443 \u0432\u0430\u0441 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430.<\/p>\n<p>  \u0423 <code>zend_class_entry<\/code> \u043f\u043e\u043b\u0435 <code>doc_comment<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u0423 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<h1>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/h1>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHP, \u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0441\u0430\u043c PHP, \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u0421\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u0432\u0438\u0434\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c\u044e, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u2014 \u00ab\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439\u00bb \u043f\u0430\u043c\u044f\u0442\u044c\u044e.<\/p>\n<p>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 PHP \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u043d \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0433\u043e\u0442\u043e\u0432\u044f\u0441\u044c \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00ab\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432\u00bb (the share nothing architecture). \u0422\u0430\u043a \u0431\u044b\u043b\u043e \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043e \u0432 PHP \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430, \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043d\u0438\u0445. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0451, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043e. \u0422\u0430\u043a \u0447\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0441\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438, \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 PHP \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u043f\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<p>  \u0421 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0432\u0441\u0451 \u0438\u043d\u0430\u0447\u0435. \u041e\u043d\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0445 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0430\u043c\u043e\u0433\u043e PHP \u2014 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u0431 SAPI, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PHP-FPM). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b, \u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 (\u0432 \u043a\u043e\u043d\u0446\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e).<\/p>\n<pre><code class=\"cpp\">if (EG(full_tables_cleanup)) {     zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);     zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class_full TSRMLS_CC); } else {     zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function TSRMLS_CC);     zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class TSRMLS_CC); }  static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) {     return ((*ce)-&gt;type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043f\u043a\u043e\u0434\u043e\u0432, \u043a\u0430\u043a OPCache, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438. OPCache \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e PHP-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0442\u043e \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e PHP-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442 \u043a\u043b\u0430\u0441\u0441\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 PHP, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u2014 \u0445\u043e\u0442\u044f \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0431\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0447\u0435\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u0438\u043c.<\/p>\n<h1>\u041a\u043b\u0430\u0441\u0441\u044b, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u043b\u0438 \u0442\u0440\u0435\u0439\u0442\u044b \u2014 \u0431\u0435\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b<\/h1>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0438 \u0442\u0440\u0435\u0439\u0442\u0430\u043c\u0438 \u0432 PHP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u2014 <code>zend_class_entry<\/code>. \u0418 \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0430. \u0418\u043d\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442 \u0432 \u043a\u043e\u0434\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432 catch-\u0431\u043b\u043e\u043a\u0430\u0445. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">interface BarException { } class MyException extends Exception implements BarException { }  try {     $foo-&gt;bar(): } catch (BarException $e) { } <\/code><\/pre>\n<p>  \u041d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 912 \u0431\u0430\u0439\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 BarException.<\/p>\n<pre><code class=\"php\">$class = &lt;&lt;&lt;'CL' interface Bar { } CL; $m = memory_get_usage(); eval($class); echo memory_get_usage() - $m . &quot;\\n&quot;; \/* 912 bytes *\/ <\/code><\/pre>\n<p>  \u041d\u0435 \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e \u0438\u043b\u0438 \u0433\u043b\u0443\u043f\u043e, \u044f \u043d\u0435 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043d\u0438\u043a\u043e\u0433\u043e \u0438 \u043d\u0438\u0447\u0442\u043e \u043e\u0431\u0432\u0438\u043d\u044f\u0442\u044c. \u041f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b PHP, \u043a\u043b\u0430\u0441\u0441\u044b, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0442\u0440\u0435\u0439\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043f\u0430\u0440\u0441\u0435\u0440 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>zend_class_entry<\/code> \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u044f\u0434 \u043f\u043e\u043b\u0435\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>static_members_table<\/code>, \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438. \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0439\u0442\u0430 \u0438\u043b\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<h1>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430<\/h1>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442 \u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0430 \u043a\u0430\u043a \u0436\u0435 \u0432\u0441\u0451 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435. \u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u00ab\u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432 \u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 \u0438 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c\u00bb. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435, \u043d\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u043c \u0442\u0440\u0435\u0439\u0442\u044b \u0438 \u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0449\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u0435\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0430 \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0442\u0440\u0430\u0442\u044f\u0442\u0441\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0448\u043b\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0414\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u044f\u0434\u0440\u043e\u043c \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 PHP, \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u2014 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b PHP.<\/p>\n<p>  \u0412\u0441\u0451 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0422\u043e\u0433\u0434\u0430 \u0432 \u0445\u043e\u0434\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0431\u0443\u0434\u044c \u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b) \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435.<\/p>\n<pre><code class=\"cpp\">\/* Single class *\/ case ZEND_DECLARE_CLASS:     if (do_bind_class(CG(active_op_array), opline, CG(class_table), 1 TSRMLS_CC) == NULL) {         return;     }     table = CG(class_table);     break; <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <code>do_bind_class()<\/code>. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"cpp\">void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC) {     zend_abstract_info ai;      if ((ce-&gt;ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) && !(ce-&gt;ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {         memset(&ai, 0, sizeof(ai));          zend_hash_apply_with_argument(&ce-&gt;function_table, (apply_func_arg_t) zend_verify_abstract_class_function, &ai TSRMLS_CC);          if (ai.cnt) {             zend_error(E_ERROR, &quot;Class %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (&quot; MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT &quot;)&quot;,                 ce-&gt;name, ai.cnt,                 ai.cnt &gt; 1 ? &quot;s&quot; : &quot;&quot;,                 DISPLAY_ABSTRACT_FN(0),                 DISPLAY_ABSTRACT_FN(1),                 DISPLAY_ABSTRACT_FN(2)                 );         }     } } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439.<\/p>\n<p>  \u041f\u0440\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043b\u0438 \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u0430 \u043d\u0435 \u0441\u0430\u043c\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c (\u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e).<\/li>\n<li>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439.<\/li>\n<li>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0438 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435).<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u043c.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0434 \u00ab\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c\u00bb \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442.<\/p>\n<pre><code class=\"cpp\">ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC) {     \/* ... ... *\/      } else {         if (ce-&gt;num_interfaces &gt;= current_iface_num) {             if (ce-&gt;type == ZEND_INTERNAL_CLASS) {                 ce-&gt;interfaces = (zend_class_entry **) realloc(ce-&gt;interfaces, sizeof(zend_class_entry *) * (++current_iface_num));             } else {                 ce-&gt;interfaces = (zend_class_entry **) erealloc(ce-&gt;interfaces, sizeof(zend_class_entry *) * (++current_iface_num));             }         }         ce-&gt;interfaces[ce-&gt;num_interfaces++] = iface;          zend_hash_merge_ex(&ce-&gt;constants_table, &iface-&gt;constants_table, (copy_ctor_func_t) zval_add_ref, sizeof(zval *), (merge_checker_func_t) do_inherit_constant_check, iface);         zend_hash_merge_ex(&ce-&gt;function_table, &iface-&gt;function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (merge_checker_func_t) do_inherit_method_check, ce);          do_implement_interface(ce, iface TSRMLS_CC);         zend_do_inherit_interfaces(ce, iface TSRMLS_CC);     } } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>realloc()<\/code>, \u0432\u0442\u043e\u0440\u044b\u0435 \u2014 <code>erealloc()<\/code>. <code>realloc()<\/code> \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u00ab\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e\u00bb \u043f\u0430\u043c\u044f\u0442\u044c, \u0430 <code>erealloc()<\/code> \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c\u044e, \u00ab\u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443\u00bb.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441-1 \u0438 \u043a\u043b\u0430\u0441\u0441-1), \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043b\u0431\u0435\u043a\u0430 <code>zval_add_ref<\/code>. \u041e\u043d \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e, \u0430 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u043e\u0432.<\/p>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u043c\u0435\u0442\u043e\u0434\u043e\u0432) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>do_inherit_method<\/code>:<\/p>\n<pre><code class=\"cpp\">static void do_inherit_method(zend_function *function) {     function_add_ref(function); }  ZEND_API void function_add_ref(zend_function *function) {     if (function-&gt;type == ZEND_USER_FUNCTION) {         zend_op_array *op_array = &function-&gt;op_array;          (*op_array-&gt;refcount)++;         if (op_array-&gt;static_variables) {             HashTable *static_variables = op_array-&gt;static_variables;             zval *tmp_zval;              ALLOC_HASHTABLE(op_array-&gt;static_variables);             zend_hash_init(op_array-&gt;static_variables, zend_hash_num_elements(static_variables), NULL, ZVAL_PTR_DTOR, 0);             zend_hash_copy(op_array-&gt;static_variables, static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_zval, sizeof(zval *));         }         op_array-&gt;run_time_cache = NULL;     } } <\/code><\/pre>\n<p>  \u041a OPArray \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d <code>refcount<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>zval_add_ref<\/code> \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u041d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u0435\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u044d\u0442\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043a\u043e\u0440\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442.<\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u0437\u0434\u0435\u0441\u044c, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u00ab\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432\u00bb. \u041d\u043e \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 PHP \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u043a\u043b\u0430\u0441\u0441\u0435, \u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u2014 \u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">\/* good *\/ class A { } class B extends A { } <\/code><\/pre>\n<p>  \u0432\u043c\u0435\u0441\u0442\u043e:<\/p>\n<pre><code class=\"php\">\/* bad *\/ class B extends A { } class A { } <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e:<\/p>\n<pre><code class=\"php\">\/* \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 *\/ class B extends A { } class A { } <\/code><\/pre>\n<pre><code class=\"php\">\/* \u0430 \u044d\u0442\u043e \u043d\u0435\u0442 *\/ Fatal error: Class 'B' not found *\/ class C extends B { } class B extends A { } class A { } <\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0412 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043d \u0435\u0449\u0451 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u043a\u043b\u0430\u0441\u0441\u0435 \u0410. \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0410 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u0435\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d, \u0431\u0443\u0434\u0443\u0447\u0438 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0451 \u0438\u043d\u0430\u0447\u0435. \u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0421 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0435\u0449\u0451 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0412, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0421, \u0442\u043e \u043e\u043d \u0438\u0449\u0435\u0442 \u0412, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0412 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c. \u0412\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u201cClass B doesn\u2019t exist\u201d.<\/p>\n<h1>\u041e\u0431\u044a\u0435\u043a\u0442\u044b<\/h1>\n<p>  \u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\u041a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438.<\/li>\n<li>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u044b \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/li>\n<li>\u041a\u043b\u0430\u0441\u0441\u044b, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0442\u0440\u0435\u0439\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u044b.<\/li>\n<li>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0438 \u0434\u043e\u043b\u0433\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u043d\u0435 \u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e\u00bb \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430) \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u043a\u043e\u043b\u043e 200 \u0431\u0430\u0439\u0442. \u0412\u0441\u0451 \u0434\u0435\u043b\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0435. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0442\u043e\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c, \u043d\u043e \u044d\u0442\u043e \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0431\u0430\u0439\u0442. \u041f\u043e \u0441\u0443\u0442\u0438, \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u0440\u043e\u0445\u043e\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u0437 \u043a\u0440\u043e\u0445\u043e\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440.<\/p>\n<h1>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/h1>\n<p>  \u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <code>zend_function_structure<\/code>. \u0420\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f. \u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0443 <code>function_table<\/code> \u0432 <code>zend_class_entry<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cpp\">typedef union _zend_function {     zend_uchar type;      struct {         zend_uchar type;         const char *function_name;         zend_class_entry *scope;         zend_uint fn_flags;         union _zend_function *prototype;         zend_uint num_args;         zend_uint required_num_args;         zend_arg_info *arg_info;     } common;      zend_op_array op_array;     zend_internal_function internal_function; } zend_function; <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u0442\u043e \u0434\u0432\u0438\u0436\u043e\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0449\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u0430 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>__call()<\/code>. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u2014 public\/protected\/private \u2014 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">static union _zend_function *zend_std_get_method(zval **object_ptr, char *method_name, int method_len, const zend_literal *key TSRMLS_DC) {     zend_function *fbc;     zval *object = *object_ptr;     zend_object *zobj = Z_OBJ_P(object);     ulong hash_value;     char *lc_method_name;     ALLOCA_FLAG(use_heap)      if (EXPECTED(key != NULL)) {         lc_method_name = Z_STRVAL(key-&gt;constant);         hash_value = key-&gt;hash_value;     } else {         lc_method_name = do_alloca(method_len+1, use_heap);         zend_str_tolower_copy(lc_method_name, method_name, method_len);         hash_value = zend_hash_func(lc_method_name, method_len+1);     }     \/* If the method is not found *\/     if (UNEXPECTED(zend_hash_quick_find(&zobj-&gt;ce-&gt;function_table, lc_method_name, method_len+1, hash_value, (void **)&fbc) == FAILURE)) {         if (UNEXPECTED(!key)) {             free_alloca(lc_method_name, use_heap);         }         if (zobj-&gt;ce-&gt;__call) { \/* if the class has got a __call() handler *\/             return zend_get_user_call_function(zobj-&gt;ce, method_name, method_len); \/* call the __call() handler *\/         } else {             return NULL; \/* else return NULL, which will likely lead to a fatal error : method not found *\/         }     }      \/* Check access level *\/     if (fbc-&gt;op_array.fn_flags & ZEND_ACC_PRIVATE) {         zend_function *updated_fbc;         updated_fbc = zend_check_private_int(fbc, Z_OBJ_HANDLER_P(object, get_class_entry)(object TSRMLS_CC), lc_method_name, method_len, hash_value TSRMLS_CC);         if (EXPECTED(updated_fbc != NULL)) {             fbc = updated_fbc;         } else {             if (zobj-&gt;ce-&gt;__call) {                 fbc = zend_get_user_call_function(zobj-&gt;ce, method_name, method_len);             } else {                 zend_error_noreturn(E_ERROR, &quot;Call to %s method %s::%s() from context '%s'&quot;, zend_visibility_string(fbc-&gt;common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)-&gt;name : &quot;&quot;);             }         }     } else {      \/* ... ... *\/ } <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0432\u0435\u0449\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">if (EXPECTED(key != NULL)) {         lc_method_name = Z_STRVAL(key-&gt;constant);         hash_value = key-&gt;hash_value;     } else {         lc_method_name = do_alloca(method_len+1, use_heap);         \/* Create a zend_copy_str_tolower(dest, src, src_length); *\/         zend_str_tolower_copy(lc_method_name, method_name, method_len);         hash_value = zend_hash_func(lc_method_name, method_len+1);     } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0441\u043f\u0440\u0438\u0438\u043c\u0447\u0438\u0432\u043e\u0441\u0442\u0438 PHP \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 (<code>zend_str_tolower_copy()<\/code>), \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0451. \u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e, \u0430 \u0442\u0435, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>if<\/code>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>key<\/code> \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 (\u0447\u0430\u0441\u0442\u044c \u0441 <code>else<\/code>) \u2014 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PHP, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0451\u043d\u043d\u043e\u0439 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 5.4. \u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b <code>key<\/code>, \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<pre><code class=\"php\">class Foo { public function BAR() { } } $a = new Foo; $b = 'bar';  $a-&gt;bar(); \/* static call : good *\/ $a-&gt;$b(); \/* dynamic call : bad *\/ <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\/\u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440. \u0412\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>BAR()<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>bar()<\/code> \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439: \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b <code>key<\/code> \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u201cbar\u201d, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u044b. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0443\u0436\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u201c$b\u201d, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <code>key<\/code> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430. \u0417\u0430\u0442\u0435\u043c, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0443\u044e \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0435\u0451 \u0445\u0435\u0448 (<code>zend_hash_func()<\/code>), \u0447\u0442\u043e \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <code>__call()<\/code>, \u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0447\u0435\u043c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<h1>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/h1>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/882\/846\/778\/8828467783294a50b6135da7669ebc77.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u0432\u0438\u0436\u043e\u043a \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0447\u0442\u043e \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u043a\u043b\u0430\u0441\u0441 \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u2014 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u044b PHP. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0422\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0439, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u0432\u044b \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 $a \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Foo #2:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/dd9\/93a\/0ce\/dd993a0ce12f4de8847a510c8bcef322.png\"\/><\/p>\n<p>  \u0422\u0430\u043a \u0447\u0442\u043e, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u043c\u044b \u00ab\u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c\u00bb \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>zend_object<\/code> \u0432\u0435\u0441\u043e\u043c 32 \u0431\u0430\u0439\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">typedef struct _zend_object {     zend_class_entry *ce;     HashTable *properties;     zval **properties_table;     HashTable *guards; \/* protects from __get\/__set ... recursion *\/ } zend_object; <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0410 \u0438\u043c, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>zend_object_store<\/code>. \u042d\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u0432\u0438\u0436\u043a\u0430 Zend \u2014 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435:<\/p>\n<pre><code class=\"cpp\">ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC) {     zend_object_value retval;      *object = emalloc(sizeof(zend_object));     (*object)-&gt;ce = class_type;     (*object)-&gt;properties = NULL;     (*object)-&gt;properties_table = NULL;     (*object)-&gt;guards = NULL;      \/* Add the object into the store *\/     retval.handle = zend_objects_store_put(*object, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) zend_objects_free_object_storage, NULL TSRMLS_CC);      retval.handlers = &std_object_handlers;     return retval; } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type) {     int i;      if (class_type-&gt;default_properties_count) {         object-&gt;properties_table = emalloc(sizeof(zval*) * class_type-&gt;default_properties_count);         for (i = 0; i &lt; class_type-&gt;default_properties_count; i++) {             object-&gt;properties_table[i] = class_type-&gt;default_properties_table[i];             if (class_type-&gt;default_properties_table[i]) { #if ZTS                 ALLOC_ZVAL( object-&gt;properties_table[i]);                 MAKE_COPY_ZVAL(&class_type-&gt;default_properties_table[i], object-&gt;properties_table[i]); #else                 Z_ADDREF_P(object-&gt;properties_table[i]); #endif             }         }         object-&gt;properties = NULL;     } } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443\/\u0432\u0435\u043a\u0442\u043e\u0440 (\u043a\u0430\u043a \u0432 \u044f\u0437\u044b\u043a\u0435 \u0421) \u0434\u043b\u044f <code>zval*<\/code>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e PHP \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443 refcount, \u0430 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 Zend (ZTS, Zend thread safety), \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>zval<\/code>. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0449\u0438\u0445 \u043d\u0438\u0437\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0451\u043c\u043a\u043e\u0441\u0442\u044c \u0440\u0435\u0436\u0438\u043c\u0430 ZTS \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0435 ZTS PHP.<\/p>\n<p>  \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0434\u0432\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\u0427\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f <code>properties_table<\/code> \u0438 properties \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>zend_object<\/code>?<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0421-\u0432\u0435\u043a\u0442\u043e\u0440, \u0442\u043e \u043a\u0430\u043a \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e? \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 (\u0447\u0442\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c)?<\/li>\n<\/ul>\n<p>  \u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043e\u0431\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u0451\u0442 <code>zend_property_info<\/code>.<\/p>\n<pre><code class=\"cpp\">typedef struct _zend_property_info {     zend_uint flags;     const char *name;     int name_length;     ulong h;     int offset;     const char *doc_comment;     int doc_comment_len;     zend_class_entry *ce; } zend_property_info; <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 <b>\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439<\/b> \u0430\u0442\u0440\u0438\u0431\u0443\u0442 (\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e) \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0432 \u043f\u043e\u043b\u0435 <code>property_info<\/code> \u0432 <code>zend_class_entry<\/code>. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432:<\/p>\n<pre><code class=\"php\">class Foo {     public $a = 'foo';     protected $b;     private $c; } struct _zend_class_entry {         \/* ... ... *\/         HashTable function_table;         HashTable properties_info; \/* here are the properties infos about $a, $b and $c *\/         zval **default_properties_table; \/* and here, we'll find $a, $b and $c with their default values *\/         int default_properties_count; \/* this will have the value of 3 : 3 properties *\/         \/* ... ... *\/ <\/code><\/pre>\n<p>  <code>Properties_infos<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0449\u0443\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430. \u0418 \u0435\u0441\u043b\u0438 \u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <code>object-&gt;properties<\/code>. \u041f\u043e\u0442\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a scope (public\/protected\/private).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>__set()<\/code>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <code>object-&gt;property_table<\/code>.<\/p>\n<pre><code class=\"cpp\">property_info = zend_get_property_info_quick(zobj-&gt;ce, member, (zobj-&gt;ce-&gt;__set != NULL), key TSRMLS_CC);  if (EXPECTED(property_info != NULL) &&     ((EXPECTED((property_info-&gt;flags & ZEND_ACC_STATIC) == 0) &&      property_info-&gt;offset &gt;= 0) ?         (zobj-&gt;properties ?             ((variable_ptr = (zval**)zobj-&gt;properties_table[property_info-&gt;offset]) != NULL) :             (*(variable_ptr = &zobj-&gt;properties_table[property_info-&gt;offset]) != NULL)) :         (EXPECTED(zobj-&gt;properties != NULL) &&           EXPECTED(zend_hash_quick_find(zobj-&gt;properties, property_info-&gt;name, property_info-&gt;name_length+1, property_info-&gt;h, (void **) &variable_ptr) == SUCCESS)))) { \/* ... ... *\/ } else {     zend_guard *guard = NULL;         if (zobj-&gt;ce-&gt;__set && \/* class has a __set() ? *\/         zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&         !guard-&gt;in_set) {         Z_ADDREF_P(object);         if (PZVAL_IS_REF(object)) {             SEPARATE_ZVAL(&object);         }         guard-&gt;in_set = 1; \/* prevent circular setting *\/         if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) { \/* call __set() *\/         }         guard-&gt;in_set = 0;         zval_ptr_dtor(&object);     \/* ... ... *\/ <\/code><\/pre>\n<p>  \u041f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u043f\u0438\u0448\u0435\u0442\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442, \u0435\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 (\u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b.<\/p>\n<h1>\u041e\u0431\u044a\u0435\u043a\u0442\u044b, \u0432\u0435\u0434\u0443\u0449\u0438\u0435 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0441\u0441\u044b\u043b\u043a\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/h1>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435:<\/p>\n<pre><code class=\"php\">function foo($var) {     $var = 42; } $o = new MyClass; foo($o); var_dump($o); \/* this is still an object, not the integer 42 *\/ <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043a\u0430\u0436\u0443\u0442, \u0447\u0442\u043e \u00ab\u0432 PHP 5 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438\u00bb, \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043d\u0443\u0430\u043b. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0441\u0441\u044b\u043b\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u044f\u0432\u043b\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e <code>zval<\/code>, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043d\u0435 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u0435\u0433\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u043e\u0431\u0449\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0410 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0442\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 <code>zval<\/code>, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <code>object(MyClass)#1 (0) { } \/* #1 is the object handle (number), it is unique *\/<\/code><\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/633\/fbc\/1df\/633fbc1dfb914465a76ea9cec923a672.png\"\/><\/p>\n<p>  <code>Zend_object_store<\/code> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <code>new<\/code>, \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>unserialize()<\/code>, reflection API \u0438\u043b\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <code>clone<\/code>. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435.<\/p>\n<pre><code class=\"cpp\">typedef struct _zend_objects_store {     zend_object_store_bucket *object_buckets;     zend_uint top;     zend_uint size;     int free_list_head; } zend_objects_store;  typedef struct _zend_object_store_bucket {     zend_bool destructor_called;     zend_bool valid;     zend_uchar apply_count;     union _store_bucket {         struct _store_object {             void *object;             zend_objects_store_dtor_t dtor;             zend_objects_free_object_storage_t free_storage;             zend_objects_store_clone_t clone;             const zend_object_handlers *handlers;             zend_uint refcount;             gc_root_buffer *buffered;         } obj;         struct {             int next;         } free_list;     } bucket; } zend_object_store_bucket; <\/code><\/pre>\n<p>  <\/p>\n<h1>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 $this?<\/h1>\n<p>  \u041f\u043e\u043d\u044f\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>$this<\/code> \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u0432\u0438\u0436\u043a\u0430: \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435, \u0432 \u043a\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434. <code>$this<\/code> \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044f \u0441\u0435\u0431\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u2014 \u0432 \u043e\u0431\u0449\u0435\u043c, \u00ab\u0432\u043e\u043b\u0448\u0435\u0431\u043d\u0430\u044f\u00bb \u0448\u0442\u0443\u043a\u0430. \u0410 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043e\u0434 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 <code>$this<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u0432\u0430\u043c\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0438 \u0435\u0441\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 <code>$this<\/code>, \u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<pre><code class=\"cpp\">\/* ... ... *\/  if (opline_is_fetch_this(last_op TSRMLS_CC)) {     zend_error(E_COMPILE_ERROR, &quot;Cannot re-assign $this&quot;); } \/* ... ... *\/  static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) {     if ((opline-&gt;opcode == ZEND_FETCH_W) && (opline-&gt;op1_type == IS_CONST)         && (Z_TYPE(CONSTANT(opline-&gt;op1.constant)) == IS_STRING)         && ((opline-&gt;extended_value & ZEND_FETCH_STATIC_MEMBER) != ZEND_FETCH_STATIC_MEMBER)         && (Z_HASH_P(&CONSTANT(opline-&gt;op1.constant)) == THIS_HASHVAL)         && (Z_STRLEN(CONSTANT(opline-&gt;op1.constant)) == (sizeof(&quot;this&quot;)-1))         && !memcmp(Z_STRVAL(CONSTANT(opline-&gt;op1.constant)), &quot;this&quot;, sizeof(&quot;this&quot;))) {         return 1;     } else {         return 0;     } } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>$this<\/code>? \u0415\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 OPCode <code>INIT_METHOD_CALL<\/code>. \u0414\u0432\u0438\u0436\u043e\u043a \u0437\u043d\u0430\u0435\u0442, \u043a\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <code>$a-&gt;foo()<\/code> \u044d\u0442\u043e <code>$a<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>$a<\/code> \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>OPCode DO_FCALL<\/code>. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0441\u043d\u043e\u0432\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434) \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 <code>$this<\/code>-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e \u2014 <code>EG(This)<\/code>.<\/p>\n<pre><code class=\"cpp\">if (fbc-&gt;type == ZEND_USER_FUNCTION || fbc-&gt;common.scope) {     should_change_scope = 1;     EX(current_this) = EG(This);     EX(current_scope) = EG(scope);     EX(current_called_scope) = EG(called_scope);     EG(This) = EX(object); \/* fetch the object prepared in previous INIT_METHOD opcode and affect it to EG(This) *\/     EG(scope) = (fbc-&gt;type == ZEND_USER_FUNCTION || !EX(object)) ? fbc-&gt;common.scope : NULL;     EG(called_scope) = EX(call)-&gt;called_scope; } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u0432\u0430\u043d, \u0435\u0441\u043b\u0438 \u0432 \u0435\u0433\u043e \u0442\u0435\u043b\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <code>$this<\/code> \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>$this-&gt;a<\/code> = 8), \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a OPCode <code>ZEND_ASSIGN_OBJ<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u0442 <code>$this<\/code> \u0438\u0437 <code>EG(This)<\/code>.<\/p>\n<pre><code class=\"cpp\">static zend_always_inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D) {     if (EXPECTED(EG(This) != NULL)) {         return &EG(This);     } else {         zend_error_noreturn(E_ERROR, &quot;Using $this when not in object context&quot;);         return NULL;     } } <\/code><\/pre>\n<p>  \u0412 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <code>$this<\/code> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>$this-&gt;foo()<\/code>) \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (<code>$this-&gt;foo($this);<\/code>), \u0442\u043e \u0434\u0432\u0438\u0436\u043e\u043a \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u044c <code>$this<\/code> \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u0430\u043a \u043e\u043d \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432 \u0445\u043e\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0434\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">if (op_array-&gt;this_var != -1 && EG(This)) {      Z_ADDREF_P(EG(This));     if (!EG(active_symbol_table)) {         EX_CV(op_array-&gt;this_var) = (zval **) EX_CV_NUM(execute_data, op_array-&gt;last_var + op_array-&gt;this_var);         *EX_CV(op_array-&gt;this_var) = EG(This);     } else {         if (zend_hash_add(EG(active_symbol_table), &quot;this&quot;, sizeof(&quot;this&quot;), &EG(This), sizeof(zval *), (void **) EX_CV_NUM(execute_data, op_array-&gt;this_var))==FAILURE) {             Z_DELREF_P(EG(This));         }     } } <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434, \u0434\u0432\u0438\u0436\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"cpp\">if (fbc-&gt;type == ZEND_USER_FUNCTION || fbc-&gt;common.scope) {     \/* ... ... *\/     EG(scope) = (fbc-&gt;type == ZEND_USER_FUNCTION || !EX(object)) ? fbc-&gt;common.scope : NULL;     \/* ... ... *\/ } <\/code><\/pre>\n<p>  <code>EG(scope)<\/code> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0442\u0438\u043f\u0443 <code>zend_class_entry<\/code>. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0432\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434. \u0418 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u0442\u0435\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0432\u0438\u0436\u043a\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">static zend_always_inline int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC) {     switch (property_info-&gt;flags & ZEND_ACC_PPP_MASK) {         case ZEND_ACC_PUBLIC:             return 1;         case ZEND_ACC_PROTECTED:             return zend_check_protected(property_info-&gt;ce, EG(scope));         case ZEND_ACC_PRIVATE:             if ((ce==EG(scope) || property_info-&gt;ce == EG(scope)) && EG(scope)) {                 return 1;             } else {                 return 0;             }             break;     }     return 0; } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u043c \u0432\u0430\u043c, \u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"php\">class A {     private $a;      public function foo(A $obj)     {         $this-&gt;a = 'foo';         $obj-&gt;a  = 'bar'; \/* yes, this is possible *\/     } }  $a = new A; $b = new A; $a-&gt;foo($b); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043b\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u0433-\u0440\u0435\u043f\u043e\u0440\u0442\u043e\u0432 \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041d\u043e \u0442\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0432 PHP \u2014 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043c\u044b \u0437\u0430\u0434\u0430\u0451\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043a\u043b\u0430\u0441\u0441\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043d\u0430\u0448\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u201cFoo\u201d, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c Foo \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e Foo, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435.<\/p>\n<h1>\u041e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435<\/h1>\n<p>  \u0414\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u043e\u043f\u0430\u0441\u043d\u044b, \u043d\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0438\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 PHP \u0438\u0445 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre><code class=\"php\">class Foo { public function __destruct() { echo &quot;byebye foo&quot;; } } $f = new Foo; thisfunctiondoesntexist(); \/* fatal error, function not found, the Foo's destructor is NOT run *\/ <\/code><\/pre>\n<p>  \u0410 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f? \u041e\u0442\u0432\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0434\u0435\u043d \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"cpp\">void shutdown_destructors(TSRMLS_D) {     zend_try {         int symbols;         do {             symbols = zend_hash_num_elements(&EG(symbol_table));             zend_hash_reverse_apply(&EG(symbol_table), (apply_func_t) zval_call_destructor TSRMLS_CC);         } while (symbols != zend_hash_num_elements(&EG(symbol_table)));         zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);     } zend_catch {         \/* if we couldn't destruct cleanly, mark all objects as destructed anyway *\/         zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);     } zend_end_try(); }  static int zval_call_destructor(zval **zv TSRMLS_DC) {     if (Z_TYPE_PP(zv) == IS_OBJECT && Z_REFCOUNT_PP(zv) == 1) {         return ZEND_HASH_APPLY_REMOVE;     } else {         return ZEND_HASH_APPLY_KEEP;     } } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0440\u0438 \u0441\u0442\u0430\u0434\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<ul>\n<li>\u0426\u0438\u043a\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438 \u0432\u044b\u0437\u043e\u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 refcount = 1.<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441 refcount &gt; 1.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/li>\n<\/ul>\n<p>  \u041a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442:<\/p>\n<p>  <code>class Foo { public function __destruct() { var_dump(&quot;destroyed Foo&quot;); } }<\/code><br \/>  <code>class Bar { public function __destruct() { var_dump(&quot;destroyed Bar&quot;); } }<\/code><\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u044b\u0439:<\/p>\n<pre><code class=\"php\">$a = new Foo; $b = new Bar; &quot;destroyed Bar&quot; &quot;destroyed Foo&quot; <\/code><\/pre>\n<p>  \u0422\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"php\">$a = new Bar; $b = new Foo; &quot;destroyed Foo&quot; &quot;destroyed Bar&quot; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0442\u043e\u0440\u043e\u0439:<\/p>\n<pre><code class=\"php\">$a = new Bar; $b = new Foo; $c = $b; \/* increment $b's object refcount *\/ &quot;destroyed Bar&quot; &quot;destroyed Foo&quot; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0435\u0442\u0438\u0439:<\/p>\n<pre><code class=\"php\">class Foo { public function __destruct() { var_dump(&quot;destroyed Foo&quot;); die();} } \/* notice the die() here *\/ class Bar { public function __destruct() { var_dump(&quot;destroyed Bar&quot;); } }  $a = new Foo; $a2 = $a; $b = new Bar; $b2 = $b;  destroyed Foo <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a. \u041d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b <code>__destruct()<\/code>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 PHP \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u0430 \u0432\u0430\u0441, \u0442\u043e \u043d\u0435 \u0432\u043e\u0437\u043c\u0443\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0442\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u0423 \u0432\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  PHP \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Zend \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u0430 \u0432\u044b\u0437\u043e\u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u0438, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043a \u043f\u0430\u0434\u0435\u043d\u0438\u044e PHP. \u0423\u0436 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 PHP 7 \u0447\u0442\u043e-\u0442\u043e \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0439, \u0442\u043e \u0432 PHP \u043e\u043d\u0438 \u0441\u043b\u0430\u0431\u043e \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b, \u0434\u0430 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a <code>__get()<\/code> \u0438 <code>__set()<\/code>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0433\u0434\u0435-\u0442\u043e \u0432 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u043c \u043a\u0430\u0434\u0440\u0435 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u0442\u043e \u043e\u043a\u0430\u0436\u0435\u0442\u0435\u0441\u044c \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0436\u0440\u0451\u0442 \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (\u043e\u0431\u044b\u0447\u043d\u043e 8 \u043a\u0431\u0430\u0439\u0442, <code>ulimit \u2013s<\/code>) \u0438 \u0441\u043b\u043e\u043c\u0430\u0435\u0442 PHP.<\/p>\n<pre><code class=\"cpp\">class Foo {     public function __destruct() { new Foo; } \/* you will crash *\/ } <\/code><\/pre>\n<p>  \u0421\u0443\u043c\u043c\u0438\u0440\u0443\u044f \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435: \u043d\u0435 \u0434\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 (lock mechanism), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 PHP \u043c\u043e\u0436\u0435\u0442 \u0438 \u043d\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043d\u0435\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c, \u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. PHP \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043a\u043e\u0433\u0434\u0430 refcount \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0434\u043e \u043d\u0443\u043b\u044f, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c.<\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043c\u043d\u043e\u0433\u043e\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435 \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. \u041e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0430 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0432 \u0421-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0438 \u0434\u0430\u0436\u0435 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.   \t<\/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=\"http:\/\/habrahabr.ru\/post\/255237\/\"> http:\/\/habrahabr.ru\/post\/255237\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 PHP 5 \u0432 2005 \u0433\u043e\u0434\u0443. \u0422\u043e\u0433\u0434\u0430 \u044f \u0435\u0449\u0451 \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u0437\u043d\u0430\u043b \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041f\u044f\u0442\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e PHP \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0439, \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0441\u0442\u0430\u043b\u0430 \u043d\u043e\u0432\u0430\u044f, \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f, \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0441\u043f\u0443\u0441\u0442\u044f, \u043e\u043a\u043e\u043b\u043e 90% \u0432\u0441\u0435\u0433\u043e PHP-\u043a\u043e\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 PHP 5.0. \u042d\u0442\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u0441\u044b\u0433\u0440\u0430\u043b\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043b\u0435\u0442. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0441\u0451 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c\u00bb. \u0427\u0442\u043e\u0431\u044b \u043b\u044e\u0434\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0438\u043d\u0430\u0447\u0435 \u2014 \u0438 \u043b\u0443\u0447\u0448\u0435, \u043f\u043e\u043b\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430. \u0422\u0430\u043a\u0436\u0435 \u044f \u0437\u0430\u0442\u0440\u043e\u043d\u0443 \u0442\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 (\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e).<\/p>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 PHP 5.4, \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043d\u043e\u0439 \u0432\u0435\u0449\u0438 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b \u0434\u043b\u044f 5.5 \u0438 5.6, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 5.3 \u0432\u0441\u0451 \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043e\u0431\u0449\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0412 PHP 7, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e, \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u043b\u0438\u0448\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0451 \u0438 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430 \u043b\u0443\u0447\u0448\u0435\u0435 \u2014 \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e. \u0411\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b userland-\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0435\u0447\u0438 \u043d\u0435 \u043f\u043e\u0439\u0434\u0451\u0442.  <\/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-254797","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254797","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=254797"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254797\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}