{"id":293845,"date":"2019-08-26T15:00:19","date_gmt":"2019-08-26T15:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293845"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293845","title":{"rendered":"\u0418\u0449\u0435\u043c \u0431\u0430\u0433\u0438 \u0432 PHP \u043a\u043e\u0434\u0435 \u0431\u0435\u0437 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041c\u043e\u044f \u0441\u0430\u043c\u0430\u044f \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043a\u043e\u0434\u0430 \u2014 \u044d\u0442\u043e \u0432\u044b\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 strpos \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043d\u0435 &#171;\u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442&#187;, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/github.com\/quasilyte\/phpgrep\">phpgrep<\/a> \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ct\/6n\/nt\/ct6nntwmvdgniqe2e625qogapj0.png\"><\/td>\n<td>\n<hr>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u0438\u0441\u043a \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u0431\u0430\u0433\u043e\u0432 \u0432 open source \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/li>\n<li>Quick start \u043f\u043e phpgrep.<\/li>\n<li>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430.<\/li>\n<\/ul>\n<hr>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"predposylki\">\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 PHP \u043b\u0438\u043d\u0442\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/VKCOM\/noverify\">NoVerify<\/a> (\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/vk\/blog\/442284\/\">NoVerify: \u043b\u0438\u043d\u0442\u0435\u0440 \u0434\u043b\u044f PHP \u043e\u0442 \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. \u0418\u0434\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e, \u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u0441\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u043d\u0435\u0435 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b <a href=\"https:\/\/github.com\/go-critic\/go-critic\">go-critic<\/a> \u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0441\u0445\u043e\u0436\u0435\u0439, \u0441 \u0442\u043e\u0439 \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 Go, \u0430 \u043d\u0435 \u043d\u0430 PHP. \u041a\u043e\u0433\u0434\u0430 \u044f \u0443\u0437\u043d\u0430\u043b \u043e\u0431 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/mvdan\/gogrep\">gogrep<\/a>, \u043c\u043e\u0439 \u043c\u0438\u0440 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u044d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0438\u043c\u0435\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0441 grep&#8217;\u043e\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435 \u043f\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c, \u0430 \u043f\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c (\u043f\u043e\u0437\u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442).<\/p>\n<p>  <\/p>\n<p>\u042f \u0443\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u0443\u043c\u043d\u043e\u0433\u043e grep, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043e\u0434\u0438\u043d \u0432\u0435\u0447\u0435\u0440 \u0440\u0435\u0448\u0438\u043b \u0441\u0435\u0441\u0442\u044c \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>phpgrep<\/code>.<\/p>\n<p>  <\/p>\n<h1 id=\"analiziruemyy-korpus\">\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u0411\u0443\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 PHP \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 GitHub.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043f\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><a href=\"https:\/\/github.com\/WordPress\/WordPress\">WordPress<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Wikia\/app\">Wikia<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/drupal\/drupal\">Drupal<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/yiisoft\/yii2\">yii2<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/bcit-ci\/CodeIgniter\">CodeIgniter<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/composer\/composer\">composer<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/phalcon\/cphalcon\">Phalcon<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/joomla\/joomla-cms\">Joomla!<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/laravel\/framework\">Laravel<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/moodle\/moodle\">moodle<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/owncloud\/core\">ownCloud core<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/phacility\/phabricator\">Phabricator<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/sebastianbergmann\/phpunit\">PHPUnit<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/symfony\/symfony\">symfony<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/woocommerce\/woocommerce\">woocommerce<\/a><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043c\u044b\u0448\u043b\u044f\u044e\u0442 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0437\u0430\u043c\u044b\u0448\u043b\u044f\u0435\u043c, \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0430\u043f\u043f\u0435\u0442\u0438\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<p>  <\/p>\n<h1 id=\"ispolzovanie-prisvaivaniya-v-kachestve-vyrazheniya\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0447\u0451\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435) \u0438<\/li>\n<li>\u043f\u0440\u0430\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0439,<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432 \u043a\u043e\u0434\u0435 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0437\u0430 &#171;\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442&#187; \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 &#171;<code>if ($cond)<\/code>&#171;.<\/li>\n<li>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430: &#171;<code>$cond ? $x : $y<\/code>&#171;.<\/li>\n<li>\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0439 \u0446\u0438\u043a\u043b\u043e\u0432 &#171;<code>while ($cond)<\/code>&#187; \u0438 &#171;<code>for ($init; $cond; $post)<\/code>&#171;.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u043b\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0447\u0435\u043c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f?<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td>\u041e\u0431\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0449\u0435\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043b\u0430 \u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0438 \u0432\u043c\u0435\u0441\u0442\u043e &#171;=&#187; \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u043b\u0441\u044f &#171;==&#187;, \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u041d\u043e \u0434\u0430\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u043f\u043e\u0440\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0437-\u0437\u0430 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0434\u0435\u043b\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.  <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 (1):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c # |     \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 (\u0438 \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c) # |     | # |     | phpgrep . 'if ($_ = []) $_' # 1 #         |                #         |                #         \u0441\u0442\u0440\u043e\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0430  # \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 3 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438. phpgrep . 'if ($_ = ${\"const\"}) $_' # 2 phpgrep . 'if ($_ = ${\"str\"}) $_'   # 3 phpgrep . 'if ($_ = ${\"num\"}) $_'   # 4<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c 4 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 (RHS). \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d &#171;<code>if ($_ = []) $_<\/code>&#187; \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 <code>if<\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. <code>$_<\/code> \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043b\u044e\u0431\u044b\u043c expression \u0438\u043b\u0438 statement.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">         \u043b\u0438\u0442\u0435\u0440\u0430\u043b \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 (RHS)          | if ($_ = []) $_     |        |     |        \u043b\u044e\u0431\u043e\u0435 \u0442\u0435\u043b\u043e if'\u0430, \u043f\u0440\u0438\u0447\u0451\u043c \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0441 {} \u0438\u043b\u0438 \u0431\u0435\u0437     \u043b\u044e\u0431\u043e\u0439 LHS \u0443 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b <strong>const<\/strong>, <strong>str<\/strong> \u0438 <strong>num<\/strong>. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>$_<\/code> \u043e\u043d\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<ul>\n<li><code>const<\/code> \u2014 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430.<\/li>\n<li><code>str<\/code> \u2014 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/li>\n<li><code>num<\/code> \u2014 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u042d\u0442\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 \u043a\u043e\u0440\u043f\u0443\u0441\u0435.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/moodle\/moodle\/blob\/0dca957716952323bd56089929ac6412136a29f1\/blocks\/rss_client\/viewfeed.php#L37-L39\">moodle\/blocks\/rss_client\/viewfeed.php#L37<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">if ($courseid = SITEID) {     $courseid = 0; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u044b\u043c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0432 moodle \u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <a href=\"https:\/\/github.com\/ADOdb\/ADOdb\">ADOdb<\/a>. \u0412 upstream \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/ADOdb\/ADOdb\/blob\/a3410de7c9397046564936e7dc81b7a6143a9e7f\/drivers\/adodb-odbtp.inc.php#L741\">ADOdb\/drivers\/adodb-odbtp.inc.php#L741<\/a>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uo\/mv\/wj\/uomvwjrpztuhmrkm4lolol9sbvg.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043c\u043d\u043e\u0433\u043e\u0435, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f <code>databaseType<\/code> \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445&#187; \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043a\u0430\u043a \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e!<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/moodle\/moodle\/blob\/0dca957716952323bd56089929ac6412136a29f1\/question\/format\/blackboard_six\/formatqti.php#L598-L600\">moodle\/question\/format\/blackboard_six\/formatqti.php#L598<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">\/\/ For BB Fill in the Blank, only interested in correct answers. if ($response-&gt;feedback = 'correct') {     \/\/ ... }<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td>\n<pre>phpgrep . 'for ($_; $_ = []; $_) $_' phpgrep . 'for ($_; $_ = ${\"const\"}; $_) $_' phpgrep . 'for ($_; $_ = ${\"num\"}; $_) $_' phpgrep . 'for ($_; $_ = ${\"str\"}; $_) $_' phpgrep . 'while ($_ = []) $_' phpgrep . 'while ($_ = ${\"const\"}) $_' phpgrep . 'while ($_ = ${\"num\"}) $_' phpgrep . 'while ($_ = ${\"str\"}) $_' phpgrep . 'if ($_ = []) $_' phpgrep . 'if ($_ = ${\"const\"}) $_' phpgrep . 'if ($_ = ${\"str\"}) $_' phpgrep . 'if ($_ = ${\"num\"}) $_' phpgrep . '$_ = [] ? $_ : $_' phpgrep . '$_ = ${\"const\"} ? $_ : $_' phpgrep . '$_ = ${\"str\"} ? $_ : $_' phpgrep . '$_ = ${\"num\"} ? $_ : $_' phpgrep . '($_ = []) &amp;&amp; $_' phpgrep . '($_ = ${\"const\"}) &amp;&amp; $_' phpgrep . '($_ = ${\"str\"}) &amp;&amp; $_' phpgrep . '($_ = ${\"num\"}) &amp;&amp; $_' phpgrep . '$_ &amp;&amp; $_ = []' phpgrep . '$_ &amp;&amp; $_ = ${\"const\"}' phpgrep . '$_ &amp;&amp; $_ = ${\"str\"}' phpgrep . '$_ &amp;&amp; $_ = ${\"num\"}' phpgrep . '($_ = []) || $_' phpgrep . '($_ = ${\"const\"}) || $_' phpgrep . '($_ = ${\"str\"}) || $_' phpgrep . '($_ = ${\"num\"}) || $_' phpgrep . '$_ || $_ = []' phpgrep . '$_ || $_ = ${\"const\"}' phpgrep . '$_ || $_ = ${\"str\"}' phpgrep . '$_ || $_ = ${\"num\"}'<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043a\u0430\u043a PHP-\u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442.<\/li>\n<li><code>$_<\/code> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 &#171;\u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e&#187;. \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 <code>.<\/code> \u0432 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/li>\n<li><code>${\"&lt;class&gt;\"}<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a <code>$_<\/code> \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 AST.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u0435\u0449\u0451 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0451, \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e (literally). \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 &#171;<code>array(1, 2 + 3)<\/code>&#187; \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u043b\u0438\u0448\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043a\u043e\u0434 (\u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442). \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0448\u0430\u0431\u043b\u043e\u043d\u0443 &#171;<code>array($_, $_)<\/code>&#187; \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<h1 id=\"sravnenie-vyrazheniya-s-samim-soboy\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u0430\u043c\u0438\u043c \u0441\u043e\u0431\u043e\u0439<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0441 \u0441\u0430\u043c\u0438\u043c \u0441\u043e\u0431\u043e\u0439 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u0434\u043a\u043e. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 <code>NaN<\/code>, \u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 copy\/paste.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/Wikia\/app\/blob\/26290575a662d621269a272339ec6154602736cd\/extensions\/SemanticDrilldown\/includes\/SD_FilterValue.php#L103\">Wikia\/app\/extensions\/SemanticDrilldown\/includes\/SD_FilterValue.php#L103<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">if ( $fv1-&gt;month == $fv1-&gt;month ) return 0;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c &#171;<code>$fv2-&gt;month<\/code>&#171;.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0447\u0430\u0441\u0442\u0435\u0439 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u0442 &#171;<code>_<\/code>&#171;. \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <a href=\"https:\/\/www.regular-expressions.info\/backref.html\">\u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/a> \u0432 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d &#171;<code>$x == $x<\/code>&#187; \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0439\u0434\u0451\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0448\u0435. \u0412\u043c\u0435\u0441\u0442\u043e &#171;<code>x<\/code>&#187; \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0435 \u0438\u043c\u044f. \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u043d\u0430 \u0431\u044b\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u043c\u0435\u043d\u0430, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0440\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0439\u0434\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e &#171;<code>$x &lt;= $x<\/code>&#171;.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/drupal\/core\/blob\/a0093891fec7368cc6ec8276d44e28cac103465b\/modules\/views\/tests\/src\/Unit\/ViewsDataTest.php#L166\">Drupal\/core\/modules\/views\/tests\/src\/Unit\/ViewsDataTest.php#L166<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">$prev = $base_tables[$base_tables_keys[$i - 1]]; $current = $base_tables[$base_tables_keys[$i]]; $this-&gt;assertTrue(   $prev['weight'] &lt;= $current['weight'] &amp;&amp;   $prev['title'] &lt;= $prev['title'], \/\/ &lt;-------------- \u043e\u0448\u0438\u0431\u043a\u0430   'The tables are sorted as expected.');<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"dubliruyuschiesya-podvyrazheniya\">\u0414\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043f\u0440\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0445 \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u0446\u0435\u0432 \u2014 &#171;<code>$_ ? $x : $x<\/code>&#171;.<br \/>  \u042d\u0442\u043e \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e true\/false \u0432\u0435\u0442\u043a\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/joomla\/joomla-cms\/blob\/81d7fcf47b821ec8f8a99fe5d87b2411579410f1\/libraries\/src\/User\/UserHelper.php#L522\">joomla-cms\/libraries\/src\/User\/UserHelper.php#L522<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">return ($show_encrypt) ? '{SHA256}' . $encrypted : '{SHA256}' . $encrypted;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0435 \u0432\u0435\u0442\u0432\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0432 \u043a\u043e\u0434\u0435. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u0434 \u0432\u043e\u043a\u0440\u0443\u0433, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e. \u0412 \u0443\u0433\u043e\u0434\u0443 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044f \u0432\u044b\u0440\u0435\u0437\u0430\u043b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$encrypted<\/code> \u0434\u043e <code>$enc<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">case 'crypt-blowfish':     return ($show_encrypt ? '{crypt}' : '') . crypt($plaintext, $salt); case 'md5-base64':     return ($show_encrypt) ? '{MD5}' . $enc : $enc; case 'ssha':     return ($show_encrypt) ? '{SSHA}' . $enc : $enc; case 'smd5':     return ($show_encrypt) ? '{SMD5}' . $enc : $enc; case 'sha256':     return ($show_encrypt) ? '{SHA256}' . $enc : '{SHA256}' . $enc; default:     return ($show_encrypt) ? '{MD5}' . $enc : $enc;<\/code><\/pre>\n<p>  <\/p>\n<p>\u042f \u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u0434\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0442\u0447:<\/p>\n<p>  <\/p>\n<pre><code class=\"diff\">- ($show_encrypt) ? '{SHA256}' . $encrypted : '{SHA256}' . $encrypted; + ($show_encrypt) ? '{SHA256}' . $encrypted : $encrypted;<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"opasnye-prioritety-operaciy-v-php\">\u041e\u043f\u0430\u0441\u043d\u044b\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 PHP<\/h1>\n<p>  <\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043c\u0435\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 PHP \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043a\u043e\u0431\u043e\u0447\u0435\u043a \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &#171;<code>x &amp; mask != 0<\/code>&#187; \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b. \u0415\u0441\u043b\u0438 <code>mask<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0438\u0442, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0432 <code>x<\/code> \u044d\u0442\u043e\u0442 \u0431\u0438\u0442 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u043b\u044f PHP \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u043a: &#171;<code>x &amp; (mask != 0)<\/code>&#171;, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u0442\u043e \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>WordPress, Joomla \u0438 moodle \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <a href=\"https:\/\/github.com\/simplepie\/simplepie\">SimplePie<\/a>.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/simplepie\/simplepie\/blob\/38b504969ed08903cb12718e8270263a8c93080e\/library\/SimplePie\/Locator.php#L254\">SimplePie\/library\/SimplePie\/Locator.php#L254<\/a><br \/>  \u2386 <a href=\"https:\/\/github.com\/simplepie\/simplepie\/blob\/38b504969ed08903cb12718e8270263a8c93080e\/library\/SimplePie\/Locator.php#L384\">SimplePie\/library\/SimplePie\/Locator.php#L384<\/a><br \/>  \u2386 <a href=\"https:\/\/github.com\/simplepie\/simplepie\/blob\/38b504969ed08903cb12718e8270263a8c93080e\/library\/SimplePie\/Locator.php#L412\">SimplePie\/library\/SimplePie\/Locator.php#L412<\/a><br \/>  \u2386 <a href=\"https:\/\/github.com\/simplepie\/simplepie\/blob\/38b504969ed08903cb12718e8270263a8c93080e\/library\/SimplePie\/Sanitize.php#L349\">SimplePie\/library\/SimplePie\/Sanitize.php#L349<\/a><br \/>  \u2386 <a href=\"https:\/\/github.com\/simplepie\/simplepie\/blob\/38b504969ed08903cb12718e8270263a8c93080e\/library\/SimplePie.php#L1634\">SimplePie\/library\/SimplePie.php#L1634<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"php\">$feed-&gt;method &amp; SIMPLEPIE_FILE_SOURCE_REMOTE === 0<\/code><\/pre>\n<p>  <\/p>\n<p><code>SIMPLEPIE_FILE_SOURCE_REMOTE<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043a\u0430\u043a <code>1<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$feed-&gt;method &amp; (1 === 0) \/\/ =&gt; $feed-&gt;method &amp; false<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td>\n<pre>phpgrep . '$x &amp; $mask == $y' phpgrep . '$x &amp; $mask === $y' phpgrep . '$x &amp; $mask !== $y' phpgrep . '$x &amp; $mask != $y' phpgrep . '$x | $mask == $y' phpgrep . '$x | $mask === $y' phpgrep . '$x | $mask !== $y' phpgrep . '$x | $mask != $y'<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0442\u0435\u043c\u0443 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e <a href=\"https:\/\/stackoverflow.com\/questions\/6224330\/understanding-nested-php-ternary-operator\">\u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 PHP<\/a>. \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u0432\u044f\u0442\u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e: <a href=\"https:\/\/habr.com\/ru\/post\/114899\/\">\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u043d\u0430\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>phpgrep<\/code>? \u041e\u0442\u0432\u0435\u0442: <strong>\u0434\u0430<\/strong>!<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">phpgrep . '$_ == $_ ? $_ : $_ ? $_ : $_' phpgrep . '$_ != $_ ? $_ : $_ ? $_ : $_'<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"prelesti-proverki-url-s-pomoschyu-regulyarnyh-vyrazheniy\">\u041f\u0440\u0435\u043b\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 URL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h1>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/Wikia\/app\/blob\/dev\/maintenance\/wikia\/updateCentralInterwiki.inc#L95\">Wikia\/app\/maintenance\/wikia\/updateCentralInterwiki.inc#L95<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">if ( preg_match( '\/(wowwiki.com|wikia.com|falloutvault.com)\/', $url ) ) {     $local = 1; } else {     $local = 0; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c URL \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 3-\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0441\u0438\u043c\u0432\u043e\u043b <code>.<\/code> \u043d\u0435 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e <code>falloutvault.com<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u0435 <code>falloutvaultxcom<\/code> \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0435 \u0438 \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n7\/sj\/pc\/n7sjpcnsabhg5ggan7tiscxy0q4.png\"><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 PHP-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0433\u0434\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u0430-\u0441\u0438\u043c\u0432\u043e\u043b, \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a \u0437\u0430\u0431\u044b\u0442\u044c \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <code>phpgrep<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">phpgrep . 'preg_match(${\"pat:str\"}, ${\"*\"})' 'pat~[^\\\\]\\.(com|ru|net|org)\\b'<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0432\u0432\u043e\u0434\u0438\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0448\u0430\u0431\u043b\u043e\u043d <code>pat<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043a \u043d\u0435\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440 \u0438\u0437 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a \u043b\u044e\u0431\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u041a\u0440\u043e\u043c\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>=<\/code> \u0438 <code>!=<\/code>. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/quasilyte\/phpgrep\/blob\/master\/pattern_language.md\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/p>\n<p><code>${\"*\"}<\/code> \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0431\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>preg_match<\/code>.<\/p>\n<p>  <\/p>\n<h1 id=\"dublikaty-klyuchey-v-literale-massiva\">\u0414\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h1>\n<p>  <\/p>\n<p>\u0412 PHP \u0432\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php var_dump(['a' =&gt; 1, 'a' =&gt; 2]); \/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: array(1) {[\"a\"]=&gt; int(2)}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>phpgrep<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[${\"*\"}, $k =&gt; $_, ${\"*\"}, $k =&gt; $_, ${\"*\"}]<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a: &#171;\u043b\u0438\u0442\u0435\u0440\u0430\u043b \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0430 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438&#187;. \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>${\"*\"}<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0430\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u044c &#171;\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e&#187;, \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044f 0-N \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e, \u043c\u0435\u0436\u0434\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u043a\u043b\u044e\u0447\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u2386 <a href=\"https:\/\/github.com\/Wikia\/app\/blob\/26290575a662d621269a272339ec6154602736cd\/extensions\/wikia\/WikiaMiniUpload\/WikiaMiniUpload_body.php#L23-L24\">Wikia\/app\/extensions\/wikia\/WikiaMiniUpload\/WikiaMiniUpload_body.php#L23<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">$script_a = [     'wmu_back' =&gt; wfMessage( 'wmu_back' )-&gt;escaped(),     'wmu_back' =&gt; wfMessage( 'wmu_back' )-&gt;escaped(),     \/\/ ... ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u0431\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u043d\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 (100+ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432) \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445 \u043d\u0435\u0441\u043b\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<p>  <\/p>\n<hr>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0448 \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u043a\u043e\u043d\u0447\u0435\u043d. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0435\u0449\u0451, \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<h1 id=\"chto-zhe-takoe-phpgrep\">\u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 phpgrep?<\/h1>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u0434\u0430 (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0442\u0438\u043f\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439) \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u0438\u0441\u043a \u2014 \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 grep&#8217;\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u0432\u0432\u043e\u0434\u0438\u0442\u0435 &#171;<code>$x<\/code>&#171;, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435 &#171;<code>$x<\/code>&#171;. \u0412\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f, \u043f\u043e \u0441\u0443\u0442\u0438, \u043f\u0430\u0440\u0441\u0438\u0442\u044c PHP-\u043a\u043e\u0434 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430\u043c\u0438. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0438\u0449\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u043b\u044e\u0431\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c\u00bb. \u041d\u043e \u0435\u0441\u043b\u0438 \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/quasilyte\/phpgrep\">phpgrep<\/a> \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 PHP-\u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e text-oriented \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043e\u043a, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e syntax-aware \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>Syntax-aware \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044f\u0437\u044b\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044f\u0437\u044b\u043a, \u0430 \u043d\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0434\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0432\u0430\u0436\u043d\u0430 \u043b\u0438\u0448\u044c \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442: Quick Start<\/b><\/p>\n<div class=\"spoiler_text\">\n<h1 id=\"quick-start\">Quick start<\/h1>\n<p>  <\/p>\n<h3 id=\"ustanovka\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f amd64 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 <a href=\"https:\/\/github.com\/quasilyte\/phpgrep\/releases\">\u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 Linux \u0438 Windows<\/a>, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Go, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u0435\u0436\u0438\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">go get -v github.com\/quasilyte\/phpgrep\/cmd\/phpgrep<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 <code>$GOPATH\/bin<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c <code>$PATH<\/code>, \u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>phpgrep<\/code> \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>-help<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">phpgrep -help<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043d\u0430\u0439\u0434\u0438\u0442\u0435, \u043a\u0443\u0434\u0430 Go \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>$PATH<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0440\u044b\u0439 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <code>$GOPATH<\/code>, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u044f\u0432\u043d\u043e: <\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">go env GOPATH<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"ispolzovanie\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>hello.php<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php function f(...$xs) {} f(10); f(20); f(30); f($x); f();<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043d\u0430 \u043d\u0451\u043c <code>phpgrep<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\"># phpgrep hello.php 'f(${\"x:int\"})' 'x!=20' hello.php:3: f(10) hello.php:5: f(30)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043d\u0430\u0448\u043b\u0438 \u0432\u0441\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>f<\/code> \u0441 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c-\u0447\u0438\u0441\u043b\u043e\u043c, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0440\u0430\u0432\u043d\u043e 20.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h1 id=\"kak-rabotaet-phpgrep\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 phpgrep<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 PHP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/z7zmey\/php-parser\">github.com\/z7zmey\/php-parser<\/a>. \u041e\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0430, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f <code>phpgrep<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0435\u0440\u0430. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u043a\u043e\u0431\u043e\u0447\u043a\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b <code>phpgrep<\/code> \u043f\u0440\u043e\u0441\u0442:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f AST \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u044b;<\/li>\n<li>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0435 AST-\u0434\u0435\u0440\u0435\u0432\u043e;<\/li>\n<li>\u043e\u0431\u0445\u043e\u0434\u0438\u043c AST \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u044c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c;<\/li>\n<li>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432;<\/li>\n<li>\u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b, \u043f\u0435\u0447\u0430\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0434\u0432\u0430 AST-\u0443\u0437\u043b\u0430. \u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e: \u043e\u0434\u0438\u043d-\u043a-\u043e\u0434\u043d\u043e\u043c\u0443, \u0430 \u043c\u0435\u0442\u0430-\u0443\u0437\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043c\u0435\u0442\u0430-\u0443\u0437\u043b\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>${\"*\"}<\/code> \u0438 <code>${\"str\"}<\/code>.<\/p>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e <code>phpgrep<\/code>, \u043d\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0432 <a href=\"https:\/\/www.jetbrains.com\/help\/phpstorm\/structural-search-and-replace.html\">structural search and replace<\/a> (SSR) \u0438\u0437 PhpStorm. \u041e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0438\u0447\u0451\u043c \u0443 SSR \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432 IDE, \u0430 <code>phpgrep<\/code> \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f standalone \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 CI.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, <code>phpgrep<\/code> \u2014 \u044d\u0442\u043e \u0435\u0449\u0451 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0434\u043b\u044f \u043c\u0430\u0442\u0447\u0438\u043d\u0433\u0430 PHP \u043a\u043e\u0434\u0430. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u0432 \u0438 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0415\u0441\u043b\u0438 \u0436\u0435 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0433\u043e SSR, \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o_\/9a\/cz\/o_9aczasnsf3wssmuunol5lyjfe.png\"><\/p>\n<h1 id=\"dopolnitelnye-materialy\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 <a href=\"https:\/\/github.com\/quasilyte\/phpgrep-contrib\/blob\/master\/scripts\/patterns.txt\">patterns.txt<\/a>. \u0420\u044f\u0434\u043e\u043c \u0441 \u044d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 <code>phpgrep-lint.sh<\/code>, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a <code>phpgrep<\/code> \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0434\u0430\u043d \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 <code>phpgrep-lint.sh<\/code> \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0440\u043f\u0430\u0442\u044c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/\">PVS studio<\/a>. \u041c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.viva64.com\/en\/b\/0390\/\">Logical Expressions: Mistakes Made by Professionals<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"># \u0414\u043b\u044f \"x != y || x != z\": phpgrep . '$x != $a || $x != $b' phpgrep . '$x !== $a || $x != $b' phpgrep . '$x != $a || $x !== $b' phpgrep . '$x !== $a || $x !== $b'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"https:\/\/speakerdeck.com\/quasilyte\/phpgrep-syntax-aware-code-search\">phpgrep: syntax-aware code search<\/a>.<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u043e\u0444\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/quasilyte.dev\/gopherkon\/?state=0a03080f020801000002000e00000009\">gopherkon<\/a>.<\/p><\/blockquote>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/464893\/\"> https:\/\/habr.com\/ru\/post\/464893\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041c\u043e\u044f \u0441\u0430\u043c\u0430\u044f \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043a\u043e\u0434\u0430 \u2014 \u044d\u0442\u043e \u0432\u044b\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 strpos \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043d\u0435 &#171;\u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442&#187;, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/github.com\/quasilyte\/phpgrep\">phpgrep<\/a> \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ct\/6n\/nt\/ct6nntwmvdgniqe2e625qogapj0.png\"><\/td>\n<td>\n<hr>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u0438\u0441\u043a \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u0431\u0430\u0433\u043e\u0432 \u0432 open source \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/li>\n<li>Quick start \u043f\u043e phpgrep.<\/li>\n<li>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430.<\/li>\n<\/ul>\n<hr>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\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-293845","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293845","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=293845"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293845\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}