{"id":316594,"date":"2021-01-19T15:00:22","date_gmt":"2021-01-19T15:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316594"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316594","title":{"rendered":"\u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0438 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 PHP"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x_\/km\/cc\/x_kmccgfjuiag5tygvtgdba7u5m.jpeg\"><\/div>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 PHP. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0443\u043c\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432.<\/p>\n<p>  \u0412 PHP \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u043e \u0445\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c: \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0443\u043f\u0435\u0440\u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043d\u0435 \u0434\u043b\u044f \u0432\u0430\u0441. <\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a \u0434\u0435\u043b\u0443! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445, \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0438 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0432 \u041b\u042e\u0411\u041e\u041c \u044f\u0437\u044b\u043a\u0435.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<ul>\n<li><a href=\"#1\">\u041f\u043e\u0447\u0435\u043c\u0443 PHP \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u043c<\/a><\/li>\n<li><a href=\"#2\">\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0438 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/li>\n<li><a href=\"#3\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430<\/a><\/li>\n<li><a href=\"#4\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430<\/a><\/li>\n<li><a href=\"#5\">\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"#6\">\u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 PHP<\/a><\/li>\n<li><a href=\"#7\">\u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0441\u0442\u044c: \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 PHP, \u0447\u0438\u0441\u043b\u0430 \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0438?<\/a><\/li>\n<li><a href=\"#8\">\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 PHP<\/a><\/li>\n<li><a href=\"#9\">\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a<\/a><\/li>\n<li><a href=\"#10\">\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"#11\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u0438\u0442\u043e\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0430<\/a><\/li>\n<li><a href=\"#12\">\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0435\u043b<\/a><\/li>\n<li><a href=\"#13\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/li>\n<\/ul>\n<p>  <a name=\"1\"><\/a><\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 PHP \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u043c<\/h2>\n<p>  \u042f \u043b\u044e\u0431\u043b\u044e PHP, \u043d\u0435 \u043f\u043e\u0439\u043c\u0438\u0442\u0435 \u043c\u0435\u043d\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0418 \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e PHP \u043d\u0435 \u043f\u043e\u0442\u044f\u043d\u0435\u0442. <\/p>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e: \u044f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043d\u0430 \u043f\u044f\u0442\u044c \u0438\u043b\u0438 \u0434\u0435\u0441\u044f\u0442\u044c \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. <\/p>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/www.php.net\/manual\/en\/language.types.integer.php\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445<\/a>, PHP \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0435, \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435, \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u0438 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 (integer). \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b \u0442\u0443\u0434\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435, \u043e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043f\u0440\u043e ZVAL \u2014 \u044d\u0442\u043e \u0421-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043a\u0430\u0436\u0434\u0443\u044e PHP-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u0412 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/php\/php-src\/blob\/da0663a337b608a4b0008672b494e3a71e6e4cfc\/Zend\/zend_types.h#L286\">\u043f\u043e\u043b\u0435 zend_long \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u0435\u043b<\/a>. \u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0442\u0438\u043f <code>lval<\/code>, \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: \u043d\u0430 64-\u0431\u0438\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 <a href=\"https:\/\/github.com\/php\/php-src\/blob\/74f3bfc6eb7ec80287178e46bd5c269fd371ce5a\/Zend\/zend_long.h#L30-L31\">\u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043a\u0430\u043a 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/a>, \u0430 \u043d\u0430 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u2014 <a href=\"https:\/\/github.com\/php\/php-src\/blob\/74f3bfc6eb7ec80287178e46bd5c269fd371ce5a\/Zend\/zend_long.h#L40-L41\">\u043a\u0430\u043a 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/a>.<\/p>\n<pre><code class=\"php\"># zval stores every integer as a lval typedef union _zend_value {   zend_long lval;   \/\/ ... } zend_value;  # lval is a 32 or 64-bit integer #ifdef ZEND_ENABLE_ZVAL_LONG64  typedef int64_t zend_long;  \/\/ ... #else  typedef int32_t zend_long;  \/\/ ... #endif <\/code><\/pre>\n<p>  \u0421\u0443\u0442\u044c \u0432\u043e\u0442 \u0432 \u0447\u0451\u043c: \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0432\u0430\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c 0xff, 0xffff, 0xffffff \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0412 PHP \u0432\u0441\u0435 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a long (<i>lval<\/i>) \u0441 \u0434\u043b\u0438\u043d\u043e\u0439 32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430.<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441 \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0435\u0439 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u0418 \u0445\u043e\u0442\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043c\u043d\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u044f \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0438. <\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0441\u0451 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0421-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u0445 \u0438\u043b\u0438 FFI, \u043d\u043e \u044d\u0442\u043e \u0438 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u0438 \u0446\u0435\u043b\u0438. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e \u0447\u0438\u0441\u0442\u043e\u043c PHP. <\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043c\u043d\u0438\u0442\u0435: \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0442\u0438\u043f\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<p>  <a name=\"2\"><\/a><\/p>\n<h2>\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0438 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a PHP \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0443\u0436\u0435 \u0432\u0441\u0451 \u0437\u043d\u0430\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0433\u043b\u0430\u0432\u0435 <a href=\"#6\">\u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 PHP<\/a>.<\/p>\n<p>  \u0412 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u00bb. \u041e\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445. \u041b\u044e\u0434\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 10), \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u0444\u0440 0, 1, 2, 3, 4, 5, 6, 7, 8 \u0438 9.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e 20 \u043a\u0430\u043a \u00ab\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20\u00bb.<\/p>\n<p>  \u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 2) \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u0446\u0438\u0444\u0440: 0 \u0438 1.<\/p>\n<p>  \u0414\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: 0b000<strong>10100<\/strong>. \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0432\u0438\u0434 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b. \ud83d\ude09<\/p>\n<p>  \u0428\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 16) \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0441\u044f\u0442\u0438 \u0446\u0438\u0444\u0440 0, 1, 2, 3, 4, 5, 6, 7, 8 \u0438 9, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0435\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430: a, b, c, d, e \u0438 f.<\/p>\n<p>  \u0414\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: 0x14. \u0415\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0432\u043e\u0437\u043b\u043e\u0436\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b, \u043e\u043d\u0438 \u0432 \u044d\u0442\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u044b!<\/p>\n<p>  <strong>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c:<\/strong> \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c\u0443 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 2), \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u043e\u043c\u0443 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 8), \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c\u0443 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 10, \u043d\u0430\u0448\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0435) \u0438 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c\u0443 (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 16).<\/p>\n<p>  \u0412 PHP \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 <strong>\u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/strong> \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043d\u043e <strong>\u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c 0b<\/strong>: \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a <strong>0b<\/strong>00010100. <strong>\u0428\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435<\/strong> \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 <strong>\u043f\u0440\u0435\u0444\u0438\u043a\u0441 0x<\/strong>: \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a <strong>0x<\/strong>14.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u043d\u0438 \u0432\u0441\u0451 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043d\u0443\u043b\u0435\u0439 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446. \u0421\u0438\u043c\u0432\u043e\u043b\u044b, \u0446\u0438\u0444\u0440\u044b, \u0431\u0443\u043a\u0432\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u2014 \u0432\u0441\u0451 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e 2. \u0411\u0443\u043a\u0432\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0443\u043a\u0432\u0430 \u00aba\u00bb \u0438\u043c\u0435\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 97 \u0432 ASCII-\u0442\u0430\u0431\u043b\u0438\u0446\u0435. <\/p>\n<p>  \u041d\u043e \u0445\u043e\u0442\u044f \u0432\u0441\u0451 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041e\u043d\u0438 \u0442\u0430\u043a \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442. \u0412\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435:<\/p>\n<pre><code class=\"php\"># string &quot;abc&quot; 'abc'  # binary form (bleh) 0b01100001 0b01100010 0b01100011  # hexadecimal form (such wow) 0x61 0x62 0x63 <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  <a name=\"3\"><\/a><\/p>\n<h2>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430<\/h2>\n<p>  \u0412\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 (carry), \u043d\u043e \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0439 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0412 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0438\u0444\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b, \u043e\u0442 0 \u0434\u043e 9. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0432\u044f\u0442\u0438, \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0446\u0438\u0444\u0440! \u0418 \u0442\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430: \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438\u0437 \u0446\u0438\u0444\u0440\u044b 1, \u0430 \u043f\u0440\u0430\u0432\u0443\u044e \u0446\u0438\u0444\u0440\u0443 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0432 0. <\/p>\n<pre><code class=\"php\"># decimal (base 10) 1 + 1 = 2 2 + 2 = 4 9 + 1 = 10 \/\/ &lt;- Carry <\/code><\/pre>\n<p>  \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0434\u0451\u0442 \u0441\u0435\u0431\u044f \u0442\u0430\u043a \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0446\u0438\u0444\u0440\u0430\u043c\u0438 0 \u0438 1.<\/p>\n<pre><code class=\"php\"># binary (base 2) 0 + 0  = 0 0 + 1  = 1 1 + 1  = 10 \/\/ &lt;- Carry 1 + 10 = 11 <\/code><\/pre>\n<p>  \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u0441 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0448\u0438\u0440\u0435.<\/p>\n<pre><code class=\"php\"># hexadecimal (base 16) 1 + 9  = a \/\/ no carry, a is in range 1 + a  = b 1 + f  = 10 \/\/ &lt;- Carry 1 + 10 = 11 <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0446\u0438\u0444\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445, \u043a\u0430\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435.<\/p>\n<p>  <a name=\"4\"><\/a><\/p>\n<h2>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430<\/h2>\n<p>  \u041a\u0430\u043a \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0448\u0435, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432\u0441\u0451 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u043b\u0438 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0432 \u0432\u0438\u0434\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a (\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0451\u043c\u043a\u043e\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (\u0431\u0438\u0442). <\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0433\u043e 20 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e 8 \u0431\u0438\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>\u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0430\u0434\u0440\u0435\u0441)<\/strong><\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><strong>\u0411\u0438\u0442<\/strong><\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u0411\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e 8 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0422\u043e \u0435\u0441\u0442\u044c <strong>0b11111111<\/strong> (\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 255) \u0431\u0443\u0434\u0435\u0442 \u0441\u0430\u043c\u044b\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0441\u0440\u0435\u0434\u0438 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043c\u0443 1 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u0447\u0442\u043e \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0446\u0438\u0444\u0440. <\/p>\n<p>  \u0417\u043d\u0430\u044f \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442: uint8 \u2014 \u044d\u0442\u043e \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 8-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 (\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0435 0\u2014255), uint16 \u2014 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 16-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 (\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0435 0\u201465535). \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 uint32, uint64 \u0438, \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435.<\/p>\n<p>  \u0417\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0438\u0442 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0438\u0442 = 0) \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0438\u0442 = 1). \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0442\u043e\u043c \u0436\u0435 \u043e\u0431\u044a\u0451\u043c\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0417\u043d\u0430\u043a\u043e\u0432\u043e\u0435 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u2014128 \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0433\u043e 127.<\/p>\n<p>  \u0412\u043e\u0442 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u201420, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e 8-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u043d \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0438\u0442 (\u0430\u0434\u0440\u0435\u0441 0, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1), \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>\u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0430\u0434\u0440\u0435\u0441)<\/strong><\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><strong>\u0411\u0438\u0442<\/strong><\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u043a\u0430 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u042d\u0442\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432. \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0438 \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a PHP \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<p>  <a name=\"5\"><\/a><\/p>\n<h2>\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0412\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 (8-\u0431\u0438\u0442\u043d\u043e\u0435, 16-\u0431\u0438\u0442\u043d\u043e\u0435) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430. \u0412\u0441\u0451 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 1 \u043a \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0446\u0438\u0444\u0440\u0435 1 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0447\u0435\u043d\u044c \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u044b (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u0435\u0437\u0443\u043c\u043d\u043e).<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>\u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0430\u0434\u0440\u0435\u0441)<\/strong><\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><strong>\u0411\u0438\u0442<\/strong><\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438 \u043a 8-\u0431\u0438\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0435\u043b\u0443 (\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c\u0443 255). \u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 255 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>\u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0430\u0434\u0440\u0435\u0441)<\/strong><\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><strong>\u0411\u0438\u0442<\/strong><\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u0412\u0441\u0435 \u0431\u0438\u0442\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b! \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 1 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0431\u0438\u0442\u043e\u0432, \u0432\u0441\u0435 8 \u0443\u0436\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b! \u042d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c<\/strong>, \u043c\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0437\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0435\u0434\u0435\u043b. \u0414\u0432\u043e\u0438\u0447\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f 255 + 2 \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u0430\u0442\u044c 8-\u0431\u0438\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 1.<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>\u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0430\u0434\u0440\u0435\u0441)<\/strong><\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td><strong>\u0411\u0438\u0442<\/strong><\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e, \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>  <a name=\"6\"><\/a><\/p>\n<h2>\u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 PHP<\/h2>\n<p>  \u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a PHP! \u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u044d\u0442\u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441, \u043d\u043e \u044f \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u0432\u0430\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0443 \u0432\u0430\u0441 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0443\u0441\u043e\u0447\u043a\u0438 \u043c\u043e\u0437\u0430\u0438\u043a\u0438: \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0432 \u043a\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043a\u0430\u043a PHP \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u0430\u2026<\/p>\n<p>  \u0414\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 PHP \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u0430 \u044586-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043d\u0430 \u044564 \u2014 64-\u0431\u0438\u0442\u043d\u043e\u0435, \u043d\u043e \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u044f\u0442\u044c \u0437\u043d\u0430\u043a (\u0442\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c). \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0432 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u043d\u043e PHP \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u043b\u044e\u0431\u044b\u043c \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043a\u0430\u043a \u0441 32- \u0438\u043b\u0438 64-\u0431\u0438\u0442\u043d\u044b\u043c.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432 PHP \u0435\u0441\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430-\u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <a href=\"https:\/\/www.php.net\/manual\/en\/function.pack.php\">pack()<\/a> \u0438 <a href=\"https:\/\/www.php.net\/manual\/en\/function.unpack.php\">unpack()<\/a>.<\/p>\n<p>  \u0412 PHP \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u0430\u043a \u0431\u0443\u0444\u0435\u0440. \u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u043e \u0438 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 (\u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435), \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a AND, OR, XOR \u0438 NOT.<\/p>\n<p>  <a name=\"7\"><\/a><\/p>\n<h2>\u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0441\u0442\u044c: \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 PHP, \u0447\u0438\u0441\u043b\u0430 \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0438?<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a OR \u0438 XOR, \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  <a name=\"8\"><\/a><\/p>\n<h2>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 PHP<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0451\u043c\u0441\u044f \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0435\u043c \u0441 PHP-\u043a\u043e\u0434\u043e\u043c!<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u0430\u0434\u043e \u0432\u0435\u0434\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0441 \u0447\u0435\u043c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e.<\/p>\n<p>  \u041e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u0447\u0435\u043d\u044c-\u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.php.net\/manual\/en\/function.sprintf\">sprintf()<\/a>. \u0423 \u043d\u0435\u0451 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 20 \u0432 8-\u0431\u0438\u0442\u043d\u043e\u043c \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438 \u0432 1-\u0431\u0430\u0439\u0442\u043d\u043e\u043c \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c:<\/p>\n<pre><code class=\"php\">&lt;?php \/\/ Decimal 20 $n = 20;  echo sprintf('%08b', $n) . &quot;\\n&quot;; echo sprintf('%02X', $n) . &quot;\\n&quot;;  \/\/ Output: 00010100 14 <\/code><\/pre>\n<p>  \u0424\u043e\u0440\u043c\u0430\u0442 <code>%08b<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>$n<\/code> \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 (<code>b<\/code>) \u0441 \u0432\u043e\u0441\u0435\u043c\u044c\u044e \u0446\u0438\u0444\u0440\u0430\u043c\u0438 (<code>08<\/code>).<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0430\u0442 <code>%02X<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>$n<\/code> \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 (<code>X<\/code>) \u0441 \u0434\u0432\u0443\u043c\u044f \u0446\u0438\u0444\u0440\u0430\u043c\u0438 (<code>02<\/code>).<\/p>\n<p>  <a name=\"9\"><\/a><\/p>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a<\/h2>\n<p>  \u0425\u043e\u0442\u044f \u0432 PHP \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043b\u0438\u043d\u043e\u0439 32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430, \u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a \u0440\u0430\u0432\u043d\u0430 \u0434\u043b\u0438\u043d\u0435 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e. \u0427\u0442\u043e\u0431\u044b \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u0439\u0442.<\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 PHP \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u044b\u043c\u0438, \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 1 \u0431\u0430\u0439\u0442. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c:<\/p>\n<pre><code class=\"php\">&lt;?php $str = 'thephp.website';  echo $str[3]; echo $str[4]; echo $str[5];  \/\/ Outputs: php <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 1 \u0431\u0430\u0439\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.php.net\/manual\/en\/function.ord\">ord()<\/a> \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a 1-\u0431\u0430\u0439\u0442\u043d\u043e\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443:<\/p>\n<pre><code class=\"php\">&lt;?php $str = 'thephp.website';  $f = ord($str[3]); $s = ord($str[4]); $t = ord($str[5]);  echo sprintf(   '%02X %02X %02X',   $f,   $s,   $t, ); \/\/ Outputs: 70 68 70 <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 hexdump:<\/p>\n<pre><code class=\"php\">$ echo 'php' | hexdump \/\/ Outputs 0000000 70 68 70 ... <\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b <code>p<\/code>, <code>h<\/code> \u0438 <code>p<\/code>.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/www.php.net\/manual\/en\/function.pack.php\">pack()<\/a> \u0438 <a href=\"https:\/\/www.php.net\/manual\/en\/function.pack.php\">unpack()<\/a>, \u0438 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440! \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c JPEG-\u0444\u0430\u0439\u043b, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, EXIF). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0436\u0438\u043c\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430:<\/p>\n<pre><code class=\"php\">&lt;?php  $h = fopen('file.jpeg', 'rb');  \/\/ Read 2 bytes $soi = fread($h, 2); <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445:<\/p>\n<pre><code class=\"php\">$ints = unpack('C*', $soi);  var_dump($ints); \/\/ Outputs array(2) {   [1] =&gt; int(-1)   [2] =&gt; int(-40) }  echo sprintf('%02X', $ints[1]); echo sprintf('%02X', $ints[2]); \/\/ Outputs FFD8 <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0421 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>unpack()<\/code> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 <code>$soi<\/code> \u0432 \u0432\u0438\u0434\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>*<\/code> \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u044e \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<p>  <a name=\"10\"><\/a><\/p>\n<h2>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>  PHP \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a\u0438\u0435 \u0432\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f. \u041e\u043d\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0438\u0436\u0435:<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td><strong>PHP-\u043a\u043e\u0434<\/strong><\/td>\n<td><strong>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/strong><\/td>\n<td><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/td>\n<\/tr>\n<tr>\n<td>$x | $y<\/td>\n<td>Inclusive OR<\/td>\n<td>$x \u0438 $y \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0442\u0430\u043c\u0438.<\/td>\n<\/tr>\n<tr>\n<td>$x ^ $y<\/td>\n<td>Exclusive OR<\/td>\n<td>$x \u0438\u043b\u0438 $y \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0442\u0430\u043c\u0438.<\/td>\n<\/tr>\n<tr>\n<td>$x &amp; $y<\/td>\n<td>AND<\/td>\n<td>$x \u0438 $y \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0442\u0430\u043c\u0438.<\/td>\n<\/tr>\n<tr>\n<td>~$x<\/td>\n<td>NOT<\/td>\n<td>\u041c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432 $x.<\/td>\n<\/tr>\n<tr>\n<td>$x &lt;&lt; $y<\/td>\n<td>Left SHIFT<\/td>\n<td>\u0421\u043c\u0435\u0449\u0430\u0435\u0442 \u0431\u0438\u0442\u044b $x \u0432\u043b\u0435\u0432\u043e \u043d\u0430 $y \u043f\u043e\u0437\u0438\u0446\u0438\u0439.<\/td>\n<\/tr>\n<tr>\n<td>$x &gt;&gt; $y<\/td>\n<td>Right SHIFT<\/td>\n<td>\u0421\u043c\u0435\u0449\u0430\u0435\u0442 \u0431\u0438\u0442\u044b $x \u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0430 $y \u043f\u043e\u0437\u0438\u0446\u0438\u0439.<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u042f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445!<\/p>\n<p>  \u041f\u0443\u0441\u0442\u044c <code>$x = 0x20<\/code> \u0438 <code>$y = 0x30<\/code>. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Inclusive Or ($x | $y)<\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f inclusive OR (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0418\u041b\u0418) \u0431\u0435\u0440\u0451\u0442 \u0432\u0441\u0435 \u0431\u0438\u0442\u044b \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u043e \u0435\u0441\u0442\u044c <code>$x | $y<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c <code>0x30<\/code>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435:<\/p>\n<pre><code class=\"php\">\/\/ 1 | 1 = 1 \/\/ 1 | 0 = 1 \/\/ 0 | 0 = 0  0b00100000 \/\/ $x = 0x20 0b00110000 \/\/ $y = 0x30 OR ------- \/\/ $x | $y 0b00110000 \/\/ 0x30 <\/code><\/pre>\n<p>  <strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e \u0431\u044b\u043b \u0437\u0430\u0434\u0430\u043d \u0448\u0435\u0441\u0442\u043e\u0439 \u0431\u0438\u0442 <code>$x<\/code> (1), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u044f\u0442\u044b\u0439 \u0438 \u0448\u0435\u0441\u0442\u043e\u0439 \u0431\u0438\u0442\u044b <code>$y<\/code>. \u0414\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u044f\u0442\u044b\u043c \u0438 \u0448\u0435\u0441\u0442\u044b\u043c \u0431\u0438\u0442\u0430\u043c\u0438: <code>0x30<\/code>.<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Exclusive Or ($x ^ $y)<\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f exclusive OR (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0418\u041b\u0418, \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u043a\u0430\u043a XOR) \u0431\u0435\u0440\u0451\u0442 \u0431\u0438\u0442\u044b, \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <code>$x ^ $y<\/code> \u0431\u0443\u0434\u0435\u0442 <code>0x10<\/code>:<\/p>\n<pre><code class=\"php\">\/\/ 1 ^ 1 = 0 \/\/ 1 ^ 0 = 1 \/\/ 0 ^ 0 = 0  0b00100000 \/\/ $x = 0x20 0b00110000 \/\/ $y = 0x30 XOR ------ \/\/ $x ^ $y 0b00010000 \/\/ 0x10 <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 AND ($x &amp; $y)<\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 AND \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041e\u043d \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0431\u0438\u0442\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0418, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0432\u043d\u044b \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <code>$x &amp; $y<\/code> \u0431\u0443\u0434\u0435\u0442 <code>0x20<\/code>:<\/p>\n<pre><code class=\"php\">\/\/ 1 &amp; 1 = 1 \/\/ 1 &amp; 0 = 0 \/\/ 0 &amp; 0 = 0  0b00100000 \/\/ $x = 0x20 0b00110000 \/\/ $y = 0x30 AND ------ \/\/ $x &amp; $y 0b00100000 \/\/ 0x20 <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 NOT (~$x)<\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 NOT \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432. \u0412\u0441\u0435 0 \u043e\u043d\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 1, \u0430 \u0432\u0441\u0435 1 \u2014 \u0432 0.:<\/p>\n<pre><code class=\"php\">\/\/ ~1 = 0 \/\/ ~0 = 1  0b00100000 \/\/ $x = 0x20 NOT ------ \/\/ ~$x 0b11011111 \/\/ 0xDF <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432 PHP \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>sprintf()<\/code>, \u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0447\u0438\u0441\u043b\u0430? \u0412 \u0433\u043b\u0430\u0432\u0435 <a href=\"#12\">\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0435\u043b<\/a> \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Left SHIFT \u0438 Right SHIFT ($x &lt;&lt; $n \u0438 $x &gt;&gt; $n)<\/h3>\n<p>  \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0431\u0438\u0442\u043e\u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0447\u0438\u0441\u0435\u043b \u043d\u0430 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0432\u043e\u0439\u043a\u0438. \u0412\u0441\u0435 \u0431\u0438\u0442\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 <code>$n<\/code> \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u0432\u043b\u0435\u0432\u043e \u0438\u043b\u0438 \u0432\u043f\u0440\u0430\u0432\u043e.<\/p>\n<p>  \u0412\u043e\u0437\u044c\u043c\u0451\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>$x = 0b0010<\/code>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0441\u043c\u0435\u0441\u0442\u0438\u043c <code>$x<\/code> \u0432\u043b\u0435\u0432\u043e, \u044d\u0442\u043e\u0442 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u043b\u0435\u0432\u043e:<\/p>\n<pre><code class=\"php\">$x = 0b0010; $x = $x &lt;&lt; 1; \/\/ 0b0100 <\/code><\/pre>\n<p>  \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u043f\u0440\u0430\u0432\u043e:<\/p>\n<pre><code class=\"php\">$x = 0b0100; $x = $x &gt;&gt; 2; \/\/ 0b0001 <\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <code>$n<\/code> \u0440\u0430\u0437 \u0432\u043b\u0435\u0432\u043e \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u0432\u043e\u0435 <code>$n<\/code> \u0440\u0430\u0437, \u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <code>$n<\/code> \u0440\u0430\u0437 \u0432\u043f\u0440\u0430\u0432\u043e \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043d\u0430 \u0434\u0432\u0430 <code>$n<\/code> \u0440\u0430\u0437.<\/p>\n<p>  <a name=\"11\"><\/a><\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u0438\u0442\u043e\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0430<\/h2>\n<p>  \u0421 \u044d\u0442\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0441\u043a\u0443. \u0422\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0438\u0434\u0435\u044e, \u0447\u0442\u043e 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0432\u043e\u0441\u044c\u043c\u043e\u0439 \u0431\u0438\u0442 (0), \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0431\u0438\u0442 \u0437\u0430\u0434\u0430\u043d. \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e <code>0x20<\/code>? \u0410 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 <code>0x81<\/code>?<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0431\u0430\u0439\u0442 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0431\u0438\u0442\u043e\u043c (<code>0b10000000<\/code>, \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e <code>0x80<\/code>) \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a <code>0x20<\/code> \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e AND. \u0415\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0432\u0435\u043d <code>0x80<\/code> (<code>0b10000000<\/code>, \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0441\u043a\u0435), \u0442\u043e \u044d\u0442\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435:<\/p>\n<pre><code class=\"php\">\/\/ 0x80 === 0b10000000 (bitmask) \/\/ 0x20 === 0b00100000 \/\/ 0x81 === 0b10000001  0x20 &amp; 0x80 === 0x80 \/\/ false 0x81 &amp; 0x80 === 0x80 \/\/ true <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0430\u043c\u043e\u043c PHP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.php.net\/manual\/en\/function.error-reporting.php\">\u0444\u043b\u0430\u0433\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/a>.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"php\">error_reporting(E_WARNING | E_NOTICE); <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"php\">0b00000010 (0x02) E_WARNING 0b00001000 (0x08) E_NOTICE OR ------- 0b00001010 (0x0A) <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 PHP \u0432\u0438\u0434\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c, \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<pre><code class=\"php\">\/\/ error reporting we set before $e_level = 0x0A;  \/\/ Needs to throw a notice if ($e_level &amp; E_NOTICE === E_NOTICE)  \/\/ Flag is set: throws notice <\/code><\/pre>\n<p>  \u0418 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u044d\u0442\u043e \u0432\u0435\u0437\u0434\u0435! \u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b, \u0432\u0441\u044f\u043a\u0438\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0432\u0435\u0449\u0438!<\/p>\n<p>  <a name=\"12\"><\/a><\/p>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0435\u043b<\/h2>\n<p>  \u0412 PHP \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b: \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0434\u0430\u0441\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 (\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439) \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"php\">echo sprintf(   '0b%08b',   ~0x20 );  \/\/ Expected 0b11011111 \/\/ Actual 0b1111111111111111111111111111111111111111111111111111111111011111 <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e? \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f NOT \u0432 8-\u0431\u0438\u0442\u043d\u043e\u043c \u0446\u0435\u043b\u043e\u043c \u0447\u0438\u0441\u043b\u0435 (<code>0x20<\/code>) \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430 \u0432\u0441\u0435 \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0431\u0438\u0442\u044b \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u044b. \u0423\u0433\u0430\u0434\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u043d\u0443\u043b\u044f\u043c\u0438? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 56 \u0431\u0438\u0442\u043e\u0432 \u0441\u043b\u0435\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c!<\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 PHP \u0434\u043b\u0438\u043d\u0430 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439!<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 ~<code>0x20 &amp; 0b11011111 === 0b11011111<\/code> \u0431\u0443\u0434\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (true). \u041d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u0438 \u0431\u0438\u0442\u044b \u0441\u043b\u0435\u0432\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f, \u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0443\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>~0x20<\/code> \u0432 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c AND \u0441 <code>0xFF<\/code> (<code>0b11111111<\/code>), \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 56 \u0431\u0438\u0442\u043e\u0432 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0443\u043b\u0438.<\/p>\n<pre><code class=\"php\">~0x20 &amp; 0xFF -&gt; 0b11011111 <\/code><\/pre>\n<p>  <strong>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/strong> \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043c\u0435\u0449\u0430\u0435\u043c \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043f\u0440\u0430\u0432\u043e \u0431\u0435\u0437 8-\u0431\u0438\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438:<\/p>\n<pre><code class=\"php\">~0x20 &amp; 0xFF -&gt; 0b11011111  0b11011111 &gt;&gt; 2 -&gt; 0b00110111 \/\/ expected  (~0x20 &amp; 0xFF) &gt;&gt; 2 -&gt; 0b00110111 \/\/ expected  (~0x20 &gt;&gt; 2) &amp; 0xFF -&gt; 0b11110111 \/\/ expected? <\/code><\/pre>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e: \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f PHP \u044d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b \u044f\u0432\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0412\u0410\u0428\u0410 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430.<\/p>\n<p>  <strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0438\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0433\u043b\u0443\u043f\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, <a href=\"https:\/\/thephp.website\/en\/issue\/real-life-tdd-php\/\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u044f \u0432 \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0435 TDD<\/a>.<\/p>\n<p>  <a name=\"13\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0438 PHP \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0435<\/h2>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0448\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432. \u0412\u0435\u0434\u044c \u0432\u0441\u0451 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 PDF \u0438\u043b\u0438 EXIF. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0434\u0430\u0436\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"https:\/\/thephp.website\/en\/issue\/messagepack-vs-json-benchmark\/\">MessagePack<\/a>, \u0438\u043b\u0438 Avro, Protobuf\u2026 \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u0435\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b!<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/538052\/\"> https:\/\/habr.com\/ru\/company\/mailru\/blog\/538052\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x_\/km\/cc\/x_kmccgfjuiag5tygvtgdba7u5m.jpeg\"><\/div>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 PHP. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0443\u043c\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432.<\/p>\n<p>  \u0412 PHP \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u043e \u0445\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c: \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0443\u043f\u0435\u0440\u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043d\u0435 \u0434\u043b\u044f \u0432\u0430\u0441. <\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a \u0434\u0435\u043b\u0443! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445, \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0438 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0432 \u041b\u042e\u0411\u041e\u041c \u044f\u0437\u044b\u043a\u0435.  <\/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-316594","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316594","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=316594"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316594\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}