{"id":49144,"date":"2018-09-16T21:44:34","date_gmt":"2018-09-16T15:44:34","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=49144"},"modified":"2018-09-16T21:44:34","modified_gmt":"2018-09-16T15:44:34","slug":"isset","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=49144","title":{"rendered":"isset()"},"content":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f PHP\u00a0<strong>isset()<\/strong>\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u00ab\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\u00bb \u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 TRUE, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 FALSE, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 (NULL).<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - 1<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">&gt;=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0430 5\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 5\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0430 5<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #339933;\">;<\/span>\r\n<a href=\"http:\/\/www.php.net\/unset\"><span style=\"color: #990000;\">unset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span> <span style=\"color: #666666; font-style: italic;\">\/\/ \u0443\u0434\u0430\u043b\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $a<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">&gt;=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0430 5\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 5\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 5<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #009900; font-weight: bold;\">NULL<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430<\/span>\r\n\u00a0\r\n\u00a0\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435<\/span>\r\n<span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <a href=\"http:\/\/www.php.net\/array\"><span style=\"color: #990000;\">array<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/isset\"><span style=\"color: #990000;\">isset<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #0000ff;\">\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #666666; font-style: italic;\">\/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 - \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f PHP\u00a0isset()\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u00ab\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430\u00bb \u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 TRUE, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 FALSE, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 (NULL). \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: $a = 5; echo isset($a); \/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &#8212; 1 \u00a0 \u00a0 $a = 5; if(isset($a)){ echo &#171;\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430&#187;; } else { echo &#171;\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430&#187;; } \/\/ \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &#8212; \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u00a0 \u00a0 $a = 5; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":49145,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-49144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":1708,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49144"}],"version-history":[{"count":1,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49144\/revisions"}],"predecessor-version":[{"id":49146,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49144\/revisions\/49146"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/49145"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49144"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}