{"id":339547,"date":"2022-10-11T15:01:28","date_gmt":"2022-10-11T15:01:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=339547"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=339547","title":{"rendered":"<span>\u0426\u0432\u0435\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u0438\u0449\u0435\u043c \u043f\u043b\u043e\u0445\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p><em>\u041a\u043e\u0433\u0434\u0430 \u0443 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439\u2026 \u0442\u043e \u0443 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u0446\u0435\u043b\u0438?<\/em><\/p>\n<\/blockquote>\n<p>\u042f \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043c\u044b\u0441\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u044f \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0432\u0432\u0435\u0441\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u00ab<em>\u0446\u0432\u0435\u0442\u00bb<\/em>), \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0432\u0438\u0434\u0430 \u00ab\u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0433\u0435\u0440 \u0438\u0437 performance-critical \u043c\u0435\u0441\u0442 \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u00bb \u0438\u043b\u0438 \u00ab\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e\u00bb.<\/p>\n<p>\u0418\u0434\u0435\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u043a \u043b\u044e\u0431\u043e\u043c\u0443: \u0445\u043e\u0442\u044c JS, \u0445\u043e\u0442\u044c Go. \u0420\u0430\u0437\u0431\u0435\u0440\u0443 \u0435\u0451 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f. \u0425\u043e\u0442\u044f \u043c\u044b \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f PHP, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 GitHub \u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7be\/9f7\/0e5\/7be9f70e59fb2205260b5dfd5e84c51b.png\" alt=\"\" title=\"\" width=\"1630\" height=\"646\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7be\/9f7\/0e5\/7be9f70e59fb2205260b5dfd5e84c51b.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041a\u0440\u0430\u0441\u043d\u044b\u0435, \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>@color<\/code> \u043d\u0430\u0434 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439. \u041f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435. \u0410 \u0442\u0435, \u0447\u0442\u043e \u0431\u0435\u0437 \u0446\u0432\u0435\u0442\u0430 \u2014 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 <code>f1()<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>f2()<\/code>, \u0438\u0445 \u0446\u0432\u0435\u0442\u0430 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f (\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443):<\/p>\n<pre><code class=\"php\">\/** @color green *\/ function f1() { f2(); }  \/\/ \u0431\u0435\u0437 \u0442\u0435\u0433\u0430 @color, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f (transparent) function f2() { f3(); }  \/** @color red *\/ function f3() { \/* ... *\/ }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e1a\/a17\/c5a\/e1aa17c5afb3e1419ac8617c946750f3.png\" alt=\"\" title=\"\" width=\"762\" height=\"150\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e1a\/a17\/c5a\/e1aa17c5afb3e1419ac8617c946750f3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 <strong>\u0446\u0432\u0435\u0442\u0430<\/strong>, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0430\u043b\u0438\u0442\u0440\u0443. <strong>\u041f\u0430\u043b\u0438\u0442\u0440\u0430<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438\u0437 \u0437\u0435\u043b\u0451\u043d\u044b\u0445:<\/p>\n<pre><code class=\"yaml\">green red: \"calling red from green is prohibited\"<\/code><\/pre>\n<p>\u0426\u0435\u043f\u043e\u0447\u043a\u0430 <code>\"green transparent red\"<\/code> \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"green red\"<\/code>, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>\"f1 \u2192 f2 \u2192 f3\"<\/code> \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443. \u0410 \u043f\u0440\u043e\u0441\u0442\u043e <code>\"f1 \u2192 f2\"<\/code> \u2014 \u044d\u0442\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0430 <code>\"green transparent\"<\/code>, \u0443\u0436\u0435 \u043d\u0435\u0442. \u042d\u0442\u043e \u043a\u0430\u043a \u043f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433: <code>\"green yellow blue red\"<\/code> \u0442\u043e\u0436\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 <code>\"green red\"<\/code>.<\/p>\n<h2>\u0414\u0443\u043c\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0446\u0432\u0435\u0442\u043e\u0432: \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <em>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 <\/em>\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u0438\u0441\u043a\u043e\u043c) \u0438 \u0435\u0441\u0442\u044c <em>\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/em> (\u0438\u043b\u0438 <em>\u0431\u044b\u0441\u0442\u0440\u044b\u0435<\/em>) \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 \u0438\u043c\u0435\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u0443\u0441\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438, \u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0437\u0435\u043b\u0451\u043d\u044b\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/043\/005\/91a\/04300591aa3445ad2ad1d39ee12e35bd.png\" alt=\"\" title=\"\" width=\"1594\" height=\"362\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/043\/005\/91a\/04300591aa3445ad2ad1d39ee12e35bd.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435? <strong>\u042d\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0435\u043b\u0451\u043d\u043e\u0439<\/strong>. \u041a\u0430\u043a-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0448\u0435, \u0434\u0430? \ud83d\ude42<\/p>\n<p>\u041d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"php\">\/\/ class ApiRequestHandler, \u0437\u0435\u043b\u0451\u043d\u0430\u044f function handleRequest(DemoRequest $req) {     $logger = createLogger();     $logger->debug('Processing ' . $req->id); }  \/\/ class Logger function debug(string $msg) {     DBLayer::instance()->addToLogTable([         'time'    => time(),         'message' => $msg,     ]); }  \/\/ class DBLayer, \u043a\u0440\u0430\u0441\u043d\u0430\u044f function addToLogTable(array $kvMap) {     \/\/ ... } <\/code><\/pre>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 (call graph):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/12d\/761\/619\/12d76161940d698adab887203d5cccce.png\" alt=\"\" title=\"\" width=\"800\" height=\"416\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/12d\/761\/619\/12d76161940d698adab887203d5cccce.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"green red\"<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041d\u0435 red \u0438 green, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043b\u044e\u0431\u043e\u0435<\/h2>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u00ab\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435, \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435\u00bb. \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e <em>slow<\/em> \u0438 <em>fast<\/em>:<\/p>\n<pre><code class=\"php\">\/** @color slow *\/ function appendLogToTable() {}  \/** @color fast *\/ function handleRequest() {}<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435:<\/p>\n<pre><code class=\"yaml\">fast slow: \"potential performance leak\"<\/code><\/pre>\n<p><strong>\u041b\u044e\u0431\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e \u0446\u0432\u0435\u0442<\/strong>:<\/p>\n<ul>\n<li>\n<p><code>@color slow<\/code>, <code>@color fast<\/code>, <code>@color performance-critical<\/code><em>;<\/em><\/p>\n<\/li>\n<li>\n<p><code>@color server-side-rendering<\/code>, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <code>@color ssr<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>@color view<\/code> \u0438 <code>@color controller<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>@color db-access<\/code>;<\/p>\n<\/li>\n<li>\n<p><em> <\/em>&#8230;\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>api-entrypoint<\/em> \u0438 <em>slow<\/em>.<\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 <strong>\u043f\u0430\u043b\u0438\u0442\u0440\u0435<\/strong> \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:<\/p>\n<pre><code class=\"yaml\">controller model: \"controllers may not depend on models\"<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0432\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a <code>@color controller<\/code> \u0438 <code>@color model<\/code>, \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u2014 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code class=\"yaml\">ssr db: \"don't fetch data from server-side rendering\"  api-entrypoint curl-request: \"performing curl requests on production is bad practice\"  green yellow red: \"a strange semaphore in your code\"<\/code><\/pre>\n<h2>\u041e\u043a\u0435\u0439, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438, \u0430 \u043a\u0430\u043a \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c?<\/h2>\n<p>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u00ab<em>\u0434\u0430, \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u0438\u0437 SSR \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u043e \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430-\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043c\u043e\u0436\u043d\u043e<\/em>\u00bb? \u0418\u043b\u0438 \u00ab<em>\u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043a\u0440\u044b\u0442\u043e \u0437\u0430 if (debug)<\/em>\u00bb?<\/p>\n<p>\u0418\u043b\u0438 \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u0432\u044b\u0448\u0435: \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c <code>Logger::debug()<\/code>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"fast slow\"<\/code>?<\/p>\n<p><strong>\u0426\u0432\u0435\u0442\u0430 \u0438 \u043f\u0430\u043b\u0438\u0442\u0440\u0430 \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043a\u0430\u043a HTML \u0438 CSS<\/strong>. \u041d\u0435 \u043d\u0430 100% \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044f, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 \u044d\u0442\u043e div&#8217;\u043d\u0438\u043a. \u0412\u044b\u0437\u043e\u0432\u044b \u043f\u043e \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u2014 \u044d\u0442\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0410 \u0446\u0432\u0435\u0442\u0430 \u2014 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d02\/b1d\/205\/d02b1d205fa2a7ba83ecc4ce456e09a1.png\" width=\"1692\" height=\"572\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d02\/b1d\/205\/d02b1d205fa2a7ba83ecc4ce456e09a1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <em>&#171;performance leak&#187;<\/em> \u0432 CSS, \u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u0431\u044b \u0442\u0430\u043a:<\/p>\n<pre><code class=\"css\">.fast .slow {     error-text: \"potential performance leak\"; }<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, CSS-\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0438\u043f\u0430 <code>\".red .green .blue\"<\/code>. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c <strong>\u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b.<\/strong> \u041d\u0430 \u044d\u0442\u043e\u043c \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u0432\u0441\u044f \u0432\u0451\u0440\u0441\u0442\u043a\u0430:<\/p>\n<pre><code class=\"css\">.green .red {     error-text: \"don't call red from green\"; }  .green .yellow .red {     error-text: \"a strange semaphore in your code\"; }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 CSS: \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0451\u043b\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0439, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u0418\u043b\u0438&#8230;<\/p>\n<pre><code class=\"css\">.green .yellow .red {     error-text: none; }<\/code><\/pre>\n<p>\u042f\u043a\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CSS, \u0443\u0431\u0440\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430. \u041d\u0443 \u0432\u044b \u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435\u0441\u044c, \u0434\u0430?<\/p>\n<pre><code class=\"css\">.fast .slow-ignore .slow { \u00a0 \u00a0 error-text: none; }<\/code><\/pre>\n<p><strong>\u0426\u0432\u0435\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435.<\/strong> \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u0438\u043b\u0438 \u043e\u0442\u043c\u0435\u043d\u044f\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<pre><code class=\"yaml\">- fast slow: \"potential performance leak\" - fast slow-ignore slow: \"\"<\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c <code>Logger::debug()<\/code> \u0438\u0437 <em>fast<\/em>-\u0444\u0443\u043d\u043a\u0446\u0438\u0439? \u0418\u043c\u0435\u044f \u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c:<\/p>\n<pre><code class=\"php\">\/** @color slow-ignore *\/ function debug() { \/* ... *\/ } <\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0418\u0437 server-side rendering \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 \u043d\u0435\u043b\u044c\u0437\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e:<\/p>\n<pre><code class=\"yaml\">- ssr db: \"don't fetch data from server-side rendering\" - ssr allow-db db: \"\"<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2c0\/73e\/fcf\/2c073efcf34c63b56a18c35fde8f5ddc.png\" alt=\"\" title=\"\" width=\"1000\" height=\"152\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2c0\/73e\/fcf\/2c073efcf34c63b56a18c35fde8f5ddc.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0435 \u043f\u0443\u0442\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0442\u044c \u043f\u043e \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u0438\u0437 <code>f()<\/code> \u0432 <code>h()<\/code><em>:<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/52a\/8b9\/138\/52a8b91385eaf529919b720dd0c72f8e.png\" alt=\"\" title=\"\" width=\"1000\" height=\"264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52a\/8b9\/138\/52a8b91385eaf529919b720dd0c72f8e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0442\u044c \u2014 \u043e\u043a\u0435\u0439, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 <code>\"f \u2192 g2 \u2192 h => don't fetch data from server-side rendering\"<\/code>.<\/p>\n<h2>\u041d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u044b \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0446\u0432\u0435\u0442\u0430?<\/h2>\n<p>\u0426\u0432\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0430\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0431\u0443\u0434\u0442\u043e \u044d\u0442\u043e\u0442 \u0446\u0432\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<\/p>\n<pre><code class=\"php\">\/**  * @color low-level  *\/ class ConnectionCache { \/* ... *\/ }<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0446\u0432\u0435\u0442\u0430 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u043e \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u044b \u2014 \u0447\u0435\u043c \u043d\u0435 \u0446\u0432\u0435\u0442\u0430? \u0422\u0443\u0442 \u043e\u043d\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0435\u044f\u0432\u043d\u044b\u043c\u0438:<\/p>\n<pre><code class=\"php\">\/**  * @color VKApi\\Handlers  *\/ class AuthHandler { \/* ... *\/ }  \/**  * @color VKDesktop\\Templates  *\/ function tplPostTitle($post) { \/* ... *\/ } <\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u0430\u0445 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0438\u0445.<\/p>\n<pre><code class=\"yaml\">VKApi\\Handlers VKDesktop\\Templates: \"using UI from api is strange\"<\/code><\/pre>\n<p>\u0418 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c internal \u0432 \u044f\u0437\u044b\u043a\u0430\u0445, \u0433\u0434\u0435 \u0435\u0433\u043e \u043d\u0435\u0442<\/h2>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 PHP \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0445\u043e\u0447\u0435\u0442 \u0443\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u0441\u0438-\u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u043e.<\/p>\n<pre><code class=\"php\">namespace DBLayer\\Internals;  \/\/ \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b class LegacyIDMapper {     static function mapUserId($user_id) { \/* ... *\/ } }<\/code><\/pre>\n<pre><code class=\"php\">\/\/ \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043a\u0430\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 function transformLegacyUser(User $user) {     $user->id = LegacyIDMapper::mapUserId($user->id);     \/\/ ... }<\/code><\/pre>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432 Confluence \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u00ab\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 LegacyIDMapper, \u043f\u043b\u0438\u0437!\u00bb, \u0435\u0433\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u044f\u0437\u044b\u043a\u043e\u043c.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0441 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u0432\u0430 \u0446\u0432\u0435\u0442\u0430:<\/p>\n<pre><code class=\"php\">\/**  * @color db-internals  *\/ class LegacyIDMapper { \/* ... *\/ }  \/**  * @color db-public  *\/ function transformLegacyUser(User $user) { \/* ... *\/ }  <\/code><\/pre>\n<p>\u0418 \u0442\u0430\u043a\u0438\u0435 \u0434\u0432\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0443:<\/p>\n<pre><code class=\"yaml\">- db-internals: \"don't access db implementation layer directly\" - db-public db-internals: \"\"<\/code><\/pre>\n<p>\u0418 \u0432\u0441\u0451! \u041f\u0440\u044f\u043c\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043c\u0430\u0442\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u2014 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0435. \u0418 \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>fff()<\/code> \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043b\u0435\u0433\u0430\u0441\u0438, \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e:<\/p>\n<pre><code class=\"yaml\">- please-allow-legacy-here db-internals: \"\" <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>fff()<\/code> \u0442\u0430\u043a\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u2014 \u044f\u0432\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044f \u0441\u0432\u043e\u0451 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435. \u041d\u0430 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0446\u0432\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u0434\u043b\u044f <a href=\"https:\/\/github.com\/VKCOM\/kphp\">KPHP<\/a>, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u043c\u043e\u0433\u043b\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0440\u043e\u0434\u0435 \u00ab\u043b\u0435\u043d\u0442\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043b\u0435\u0437\u0442\u044c \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u00bb. \u041d\u043e \u0438\u0434\u0435\u044f \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043c\u0438\u043c\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f KPHP \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0438 \u0435\u0433\u043e \u0432 open source \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>nocolor<\/strong>.<\/p>\n<p>\u041a\u0430\u043a \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u044f\u0437\u044b\u043a \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0430\u0436\u0435\u043d. \u0412\u0430\u0436\u0435\u043d \u043a\u043e\u043d\u0446\u0435\u043f\u0442. \u0414\u0430\u0436\u0435 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u0440\u043e\u043b\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437 \u0440\u0430\u043d\u0442\u0430\u0439\u043c-\u043e\u0432\u0435\u0440\u0445\u0435\u0434\u0430, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c-\u0441\u0442\u0435\u043a \u0432 \u0432\u0438\u0434\u0435 \u0445\u0443\u043a\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0446\u0432\u0435\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0418\u0434\u0435\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0438\u043c\u043e \u0446\u0432\u0435\u0442\u0430 \u0432\u0432\u0435\u0441\u0442\u0438 <em>\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/em> (saturation). \u041c\u043e\u043b, \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f, \u0430 <em>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f \u0432 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438<\/em>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0440\u043e\u0439 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c 95-\u0439 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u0422\u043e\u0433\u0434\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442\u0430 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0435\u0449\u0451 \u0438 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0410 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043b\u0438\u0442\u0440\u0443 \u043c\u044b \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u2014 \u0435\u0441\u043b\u0438, \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u044c\u0448\u0435 \u0442\u0440\u0451\u0445 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c PHP Russia \u044f \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b \u0441 \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u043c, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0410 \u0435\u0449\u0451 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u043b, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u0446\u0432\u0435\u0442\u00bb \u0438 \u043d\u0438\u043a\u0430\u043a \u0438\u043d\u0430\u0447\u0435. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=DCMp_FgEITwhttps:\/\/www.youtube.com\/watch?v=DCMp_FgEITw\">\u0412\u0438\u0434\u0435\u043e \u0441 PHP Russia: \u00ab\u0412\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u0434\u0430\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/VKCOM\/nocolor\">nocolor \u2014 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0430 \u0446\u0432\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0434\u043b\u044f PHP-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/VKCOM\/kphp\">KPHP \u2014 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/a>.<a href=\"https:\/\/github.com\/VKCOM\/kphp\">\u00a0<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/t.me\/kphp_chat\">\u0427\u0430\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435 \u2014 KPHP (Unofficial)<\/a>. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/vk\/blog\/691828\/\"> https:\/\/habr.com\/ru\/company\/vk\/blog\/691828\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p><em>\u041a\u043e\u0433\u0434\u0430 \u0443 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439\u2026 \u0442\u043e \u0443 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u0446\u0435\u043b\u0438?<\/em><\/p>\n<\/blockquote>\n<p>\u042f \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043c\u044b\u0441\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u044f \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0432\u0432\u0435\u0441\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u00ab<em>\u0446\u0432\u0435\u0442\u00bb<\/em>), \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0432\u0438\u0434\u0430 \u00ab\u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0433\u0435\u0440 \u0438\u0437 performance-critical \u043c\u0435\u0441\u0442 \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u00bb \u0438\u043b\u0438 \u00ab\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e\u00bb.<\/p>\n<p>\u0418\u0434\u0435\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u043a \u043b\u044e\u0431\u043e\u043c\u0443: \u0445\u043e\u0442\u044c JS, \u0445\u043e\u0442\u044c Go. \u0420\u0430\u0437\u0431\u0435\u0440\u0443 \u0435\u0451 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f. \u0425\u043e\u0442\u044f \u043c\u044b \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f PHP, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 GitHub \u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041a\u0440\u0430\u0441\u043d\u044b\u0435, \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>@color<\/code> \u043d\u0430\u0434 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439. \u041f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435. \u0410 \u0442\u0435, \u0447\u0442\u043e \u0431\u0435\u0437 \u0446\u0432\u0435\u0442\u0430 \u2014 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 <code>f1()<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>f2()<\/code>, \u0438\u0445 \u0446\u0432\u0435\u0442\u0430 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f (\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443):<\/p>\n<pre><code class=\"php\">\/** @color green *\/ function f1() { f2(); }  \/\/ \u0431\u0435\u0437 \u0442\u0435\u0433\u0430 @color, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f (transparent) function f2() { f3(); }  \/** @color red *\/ function f3() { \/* ... *\/ }<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 <strong>\u0446\u0432\u0435\u0442\u0430<\/strong>, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0430\u043b\u0438\u0442\u0440\u0443. <strong>\u041f\u0430\u043b\u0438\u0442\u0440\u0430<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438\u0437 \u0437\u0435\u043b\u0451\u043d\u044b\u0445:<\/p>\n<pre><code class=\"yaml\">green red: \"calling red from green is prohibited\"<\/code><\/pre>\n<p>\u0426\u0435\u043f\u043e\u0447\u043a\u0430 <code>\"green transparent red\"<\/code> \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"green red\"<\/code>, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>\"f1 \u2192 f2 \u2192 f3\"<\/code> \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443. \u0410 \u043f\u0440\u043e\u0441\u0442\u043e <code>\"f1 \u2192 f2\"<\/code> \u2014 \u044d\u0442\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0430 <code>\"green transparent\"<\/code>, \u0443\u0436\u0435 \u043d\u0435\u0442. \u042d\u0442\u043e \u043a\u0430\u043a \u043f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433: <code>\"green yellow blue red\"<\/code> \u0442\u043e\u0436\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 <code>\"green red\"<\/code>.<\/p>\n<h2>\u0414\u0443\u043c\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0446\u0432\u0435\u0442\u043e\u0432: \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <em>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 <\/em>\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u0438\u0441\u043a\u043e\u043c) \u0438 \u0435\u0441\u0442\u044c <em>\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/em> (\u0438\u043b\u0438 <em>\u0431\u044b\u0441\u0442\u0440\u044b\u0435<\/em>) \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 \u0438\u043c\u0435\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u0443\u0441\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438, \u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0437\u0435\u043b\u0451\u043d\u044b\u043c\u0438:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435? <strong>\u042d\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0435\u043b\u0451\u043d\u043e\u0439<\/strong>. \u041a\u0430\u043a-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0448\u0435, \u0434\u0430? \ud83d\ude42<\/p>\n<p>\u041d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"php\">\/\/ class ApiRequestHandler, \u0437\u0435\u043b\u0451\u043d\u0430\u044f function handleRequest(DemoRequest $req) {     $logger = createLogger();     $logger->debug('Processing ' . $req->id); }  \/\/ class Logger function debug(string $msg) {     DBLayer::instance()->addToLogTable([         'time'    => time(),         'message' => $msg,     ]); }  \/\/ class DBLayer, \u043a\u0440\u0430\u0441\u043d\u0430\u044f function addToLogTable(array $kvMap) {     \/\/ ... } <\/code><\/pre>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 (call graph):<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"green red\"<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041d\u0435 red \u0438 green, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043b\u044e\u0431\u043e\u0435<\/h2>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u00ab\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435, \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435\u00bb. \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e <em>slow<\/em> \u0438 <em>fast<\/em>:<\/p>\n<pre><code class=\"php\">\/** @color slow *\/ function appendLogToTable() {}  \/** @color fast *\/ function handleRequest() {}<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435:<\/p>\n<pre><code class=\"yaml\">fast slow: \"potential performance leak\"<\/code><\/pre>\n<p><strong>\u041b\u044e\u0431\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e \u0446\u0432\u0435\u0442<\/strong>:<\/p>\n<ul>\n<li>\n<p><code>@color slow<\/code>, <code>@color fast<\/code>, <code>@color performance-critical<\/code><em>;<\/em><\/p>\n<\/li>\n<li>\n<p><code>@color server-side-rendering<\/code>, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <code>@color ssr<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>@color view<\/code> \u0438 <code>@color controller<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>@color db-access<\/code>;<\/p>\n<\/li>\n<li>\n<p><em> <\/em>&#8230;\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>api-entrypoint<\/em> \u0438 <em>slow<\/em>.<\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 <strong>\u043f\u0430\u043b\u0438\u0442\u0440\u0435<\/strong> \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:<\/p>\n<pre><code class=\"yaml\">controller model: \"controllers may not depend on models\"<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0432\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a <code>@color controller<\/code> \u0438 <code>@color model<\/code>, \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u2014 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code class=\"yaml\">ssr db: \"don't fetch data from server-side rendering\"  api-entrypoint curl-request: \"performing curl requests on production is bad practice\"  green yellow red: \"a strange semaphore in your code\"<\/code><\/pre>\n<h2>\u041e\u043a\u0435\u0439, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438, \u0430 \u043a\u0430\u043a \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c?<\/h2>\n<p>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u00ab<em>\u0434\u0430, \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u0438\u0437 SSR \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u043e \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430-\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043c\u043e\u0436\u043d\u043e<\/em>\u00bb? \u0418\u043b\u0438 \u00ab<em>\u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043a\u0440\u044b\u0442\u043e \u0437\u0430 if (debug)<\/em>\u00bb?<\/p>\n<p>\u0418\u043b\u0438 \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u0432\u044b\u0448\u0435: \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c <code>Logger::debug()<\/code>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>\"fast slow\"<\/code>?<\/p>\n<p><strong>\u0426\u0432\u0435\u0442\u0430 \u0438 \u043f\u0430\u043b\u0438\u0442\u0440\u0430 \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043a\u0430\u043a HTML \u0438 CSS<\/strong>. \u041d\u0435 \u043d\u0430 100% \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044f, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 \u044d\u0442\u043e div&#8217;\u043d\u0438\u043a. \u0412\u044b\u0437\u043e\u0432\u044b \u043f\u043e \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u2014 \u044d\u0442\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0410 \u0446\u0432\u0435\u0442\u0430 \u2014 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <em>&#171;performance leak&#187;<\/em> \u0432 CSS, \u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u0431\u044b \u0442\u0430\u043a:<\/p>\n<pre><code class=\"css\">.fast .slow {     error-text: \"potential performance leak\"; }<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, CSS-\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0438\u043f\u0430 <code>\".red .green .blue\"<\/code>. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c <strong>\u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b.<\/strong> \u041d\u0430 \u044d\u0442\u043e\u043c \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u0432\u0441\u044f \u0432\u0451\u0440\u0441\u0442\u043a\u0430:<\/p>\n<pre><code class=\"css\">.green .red {     error-text: \"don't call red from green\"; }  .green .yellow .red {     error-text: \"a strange semaphore in your code\"; }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 CSS: \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0451\u043b\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0439, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u0418\u043b\u0438&#8230;<\/p>\n<pre><code class=\"css\">.green .yellow .red {     error-text: none; }<\/code><\/pre>\n<p>\u042f\u043a\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CSS, \u0443\u0431\u0440\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430. \u041d\u0443 \u0432\u044b \u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435\u0441\u044c, \u0434\u0430?<\/p>\n<pre><code class=\"css\">.fast .slow-ignore .slow { \u00a0 \u00a0 error-text: none; }<\/code><\/pre>\n<p><strong>\u0426\u0432\u0435\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435.<\/strong> \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u0438\u043b\u0438 \u043e\u0442\u043c\u0435\u043d\u044f\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<pre><code class=\"yaml\">- fast slow: \"potential performance leak\" - fast slow-ignore slow: \"\"<\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c <code>Logger::debug()<\/code> \u0438\u0437 <em>fast<\/em>-\u0444\u0443\u043d\u043a\u0446\u0438\u0439? \u0418\u043c\u0435\u044f \u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c:<\/p>\n<pre><code class=\"php\">\/** @color slow-ignore *\/ function debug() { \/* ... *\/ } <\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0418\u0437 server-side rendering \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 \u043d\u0435\u043b\u044c\u0437\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e:<\/p>\n<pre><code class=\"yaml\">- ssr db: \"don't fetch data from server-side rendering\" - ssr allow-db db: \"\"<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0435 \u043f\u0443\u0442\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0442\u044c \u043f\u043e \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u0443 \u0438\u0437 <code>f()<\/code> \u0432 <code>h()<\/code><em>:<\/em><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0442\u044c \u2014 \u043e\u043a\u0435\u0439, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 <code>\"f \u2192 g2 \u2192 h => don't fetch data from server-side rendering\"<\/code>.<\/p>\n<h2>\u041d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u044b \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0446\u0432\u0435\u0442\u0430?<\/h2>\n<p>\u0426\u0432\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0430\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0431\u0443\u0434\u0442\u043e \u044d\u0442\u043e\u0442 \u0446\u0432\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<\/p>\n<pre><code class=\"php\">\/**  * @color low-level  *\/ class ConnectionCache { \/* ... *\/ }<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0446\u0432\u0435\u0442\u0430 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u043e \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u044b \u2014 \u0447\u0435\u043c \u043d\u0435 \u0446\u0432\u0435\u0442\u0430? \u0422\u0443\u0442 \u043e\u043d\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0435\u044f\u0432\u043d\u044b\u043c\u0438:<\/p>\n<pre><code class=\"php\">\/**  * @color VKApi\\Handlers  *\/ class AuthHandler { \/* ... *\/ }  \/**  * @color VKDesktop\\Templates  *\/ function tplPostTitle($post) { \/* ... *\/ } <\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u0430\u0445 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0438\u0445.<\/p>\n<pre><code class=\"yaml\">VKApi\\Handlers VKDesktop\\Templates: \"using UI from api is strange\"<\/code><\/pre>\n<p>\u0418 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c internal \u0432 \u044f\u0437\u044b\u043a\u0430\u0445, \u0433\u0434\u0435 \u0435\u0433\u043e \u043d\u0435\u0442<\/h2>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 PHP \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0445\u043e\u0447\u0435\u0442 \u0443\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u0441\u0438-\u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u043e.<\/p>\n<pre><code class=\"php\">namespace DBLayer\\Internals;  \/\/ \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b class LegacyIDMapper {     static function mapUserId($user_id) { \/* ... *\/ } }<\/code><\/pre>\n<pre><code class=\"php\">\/\/ \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043a\u0430\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 function transformLegacyUser(User $user) {     $user->id = LegacyIDMapper::mapUserId($user->id);     \/\/ ... }<\/code><\/pre>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432 Confluence \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u00ab\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 LegacyIDMapper, \u043f\u043b\u0438\u0437!\u00bb, \u0435\u0433\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u044f\u0437\u044b\u043a\u043e\u043c.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0441 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u0432\u0430 \u0446\u0432\u0435\u0442\u0430:<\/p>\n<pre><code class=\"php\">\/**  * @color db-internals  *\/ class LegacyIDMapper { \/* ... *\/ }  \/**  * @color db-public  *\/ function transformLegacyUser(User $user) { \/* ... *\/ }  <\/code><\/pre>\n<p>\u0418 \u0442\u0430\u043a\u0438\u0435 \u0434\u0432\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043f\u0430\u043b\u0438\u0442\u0440\u0443:<\/p>\n<pre><code class=\"yaml\">- db-internals: \"don't access db implementation layer directly\" - db-public db-internals: \"\"<\/code><\/pre>\n<p>\u0418 \u0432\u0441\u0451! \u041f\u0440\u044f\u043c\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043c\u0430\u0442\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u2014 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0435. \u0418 \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>fff()<\/code> \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043b\u0435\u0433\u0430\u0441\u0438, \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e:<\/p>\n<pre><code class=\"yaml\">- please-allow-legacy-here db-internals: \"\" <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>fff()<\/code> \u0442\u0430\u043a\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u2014 \u044f\u0432\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044f \u0441\u0432\u043e\u0451 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435. \u041d\u0430 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0446\u0432\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u0434\u043b\u044f <a href=\"https:\/\/github.com\/VKCOM\/kphp\">KPHP<\/a>, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u043c\u043e\u0433\u043b\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0440\u043e\u0434\u0435 \u00ab\u043b\u0435\u043d\u0442\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043b\u0435\u0437\u0442\u044c \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u00bb. \u041d\u043e \u0438\u0434\u0435\u044f \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043c\u0438\u043c\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f KPHP \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0438 \u0435\u0433\u043e \u0432 open source \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>nocolor<\/strong>.<\/p>\n<p>\u041a\u0430\u043a \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u044f\u0437\u044b\u043a \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0430\u0436\u0435\u043d. \u0412\u0430\u0436\u0435\u043d \u043a\u043e\u043d\u0446\u0435\u043f\u0442. \u0414\u0430\u0436\u0435 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u0440\u043e\u043b\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u043e\u043b\u043b\u0433\u0440\u0430\u0444\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437 \u0440\u0430\u043d\u0442\u0430\u0439\u043c-\u043e\u0432\u0435\u0440\u0445\u0435\u0434\u0430, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c-\u0441\u0442\u0435\u043a \u0432 \u0432\u0438\u0434\u0435 \u0445\u0443\u043a\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0446\u0432\u0435\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0418\u0434\u0435\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0438\u043c\u043e \u0446\u0432\u0435\u0442\u0430 \u0432\u0432\u0435\u0441\u0442\u0438 <em>\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/em> (saturation). \u041c\u043e\u043b, \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f, \u0430 <em>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f \u0432 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438<\/em>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0440\u043e\u0439 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c 95-\u0439 \u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u0422\u043e\u0433\u0434\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442\u0430 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0435\u0449\u0451 \u0438 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0410 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043b\u0438\u0442\u0440\u0443 \u043c\u044b \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u2014 \u0435\u0441\u043b\u0438, \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u044c\u0448\u0435 \u0442\u0440\u0451\u0445 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c PHP Russia \u044f \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b \u0441 \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u043c, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0410 \u0435\u0449\u0451 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u043b, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u0446\u0432\u0435\u0442\u00bb \u0438 \u043d\u0438\u043a\u0430\u043a \u0438\u043d\u0430\u0447\u0435. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=DCMp_FgEITwhttps:\/\/www.youtube.com\/watch?v=DCMp_FgEITw\">\u0412\u0438\u0434\u0435\u043e \u0441 PHP Russia: \u00ab\u0412\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u0434\u0430\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/VKCOM\/nocolor\">nocolor \u2014 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0430 \u0446\u0432\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0434\u043b\u044f PHP-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/VKCOM\/kphp\">KPHP \u2014 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/a>.<a href=\"https:\/\/github.com\/VKCOM\/kphp\">\u00a0<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/t.me\/kphp_chat\">\u0427\u0430\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435 \u2014 KPHP (Unofficial)<\/a>. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/vk\/blog\/691828\/\"> https:\/\/habr.com\/ru\/company\/vk\/blog\/691828\/<\/a><br \/><\/br><\/br><\/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-339547","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339547","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=339547"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339547\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}