{"id":494,"date":"2020-05-05T20:57:52","date_gmt":"2020-05-05T17:57:52","guid":{"rendered":"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/?p=494"},"modified":"2020-05-05T20:57:52","modified_gmt":"2020-05-05T17:57:52","slug":"typy-danykh-php","status":"publish","type":"post","link":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/typy-danykh-php\/","title":{"rendered":"\u0422\u0438\u043f\u0438 \u0434\u0430\u043d\u0438\u0445 PHP"},"content":{"rendered":"<p>PHP \u0454 \u043c\u043e\u0432\u043e\u044e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f_\u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f\">\u0434\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u043e\u0457 \u0442\u0438\u043f\u0456\u0437\u0430\u0446\u0456\u0457<\/a>, \u0442\u0438\u043f \u0437\u043c\u0456\u043d\u043d\u043e\u0457 \u0432\u0438\u0437\u043d\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0457\u0457 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f. \u0410\u043b\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0442\u0440\u0435\u0431\u0430 \u0437\u043d\u0430\u0442\u0438, \u044f\u043a\u0456 \u0442\u0438\u043f\u0438 \u0434\u0430\u043d\u0438\u0445 \u0456\u0441\u043d\u0443\u044e\u0442\u044c \u0432 PHP. \u041d\u0438\u0436\u0447\u0435 \u043f\u0435\u0440\u0435\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0456 \u0443\u0441\u0456 \u0442\u0438\u043f\u0438, \u044f\u043a\u0456 \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438 \u0432 PHP:<\/p>\n<ul>\n<li><strong>Boolean<\/strong>. \u0426\u0435 \u043b\u043e\u0433\u0456\u0447\u043d\u0438\u0439 \u0442\u0438\u043f, \u044f\u043a\u0438\u0439 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f <code>true<\/code> \u0430\u0431\u043e <code>false<\/code>.<\/li>\n<li><strong>Integer<\/strong>. \u041c\u0456\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0446\u0456\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 (\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434: <code>4<\/code> \u0430\u0431\u043e <code>10<\/code>, \u0430\u0431\u043e \u0456\u043d\u0448\u0435 \u0446\u0456\u043b\u0435 \u0447\u0438\u0441\u043b\u043e).<\/li>\n<li><strong>String<\/strong>. \u041c\u0456\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u043e\u0457 \u0434\u043e\u0432\u0436\u0438\u043d\u0438 (\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434: \u041e\u043b\u0435\u0433, \u041a\u0438\u0457\u0432, \u0410\u0432\u0441\u0442\u0440\u0456\u044f).<\/li>\n<li><strong>Float<\/strong>. \u0414\u0456\u0439\u0441\u043d\u0435 \u0447\u0438\u0441\u043b\u043e (\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434: 1.2, 3.14, 8.5498777).<\/li>\n<li><strong>Object<\/strong>. \u041e\u0431&#8217;\u0454\u043a\u0442.<\/li>\n<li><strong>Array<\/strong>. \u041c\u0430\u0441\u0441\u0438\u0432.<\/li>\n<li><strong>Resource<\/strong>. \u0420\u0435\u0441\u0443\u0440\u0441 (\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434: \u0444\u0430\u0439\u043b).<\/li>\n<li><strong>NULL<\/strong>. \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f NULL.<\/li>\n<\/ul>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n<span class=\"hljs-variable\">$bool<\/span> = <span class=\"hljs-keyword\">true<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f Boolean<\/span>\r\n<span class=\"hljs-variable\">$int<\/span> = <span class=\"hljs-number\">100<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f Integer<\/span>\r\n<span class=\"hljs-variable\">$string<\/span> = <span class=\"hljs-string\">\"\u0417\u043c\u0456\u043d\u043d\u0430 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442\"<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f String<\/span>\r\n<span class=\"hljs-variable\">$string2<\/span> = <span class=\"hljs-string\">\"5425\"<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f String, \u043e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u0447\u0438\u0441\u043b\u043e \u0432\u0437\u044f\u0442\u043e \u0432 \u043b\u0430\u043f\u043a\u0438 !<\/span>\r\n<span class=\"hljs-variable\">$float<\/span> = <span class=\"hljs-number\">44.122<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f Float\r\n<\/span><span class=\"hljs-preprocessor\">?&gt;<\/span><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0456\u0434\u0432\u0435\u0440\u0442\u0430\u043d\u043d\u044f \u043f\u043e\u044f\u0432\u0438 \u043f\u043e\u043c\u0438\u043b\u043e\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u0442\u044c\u0441\u044f \u043d\u0435 \u0437\u043c\u0456\u0448\u0443\u0432\u0430\u0442\u0438 \u0440\u0456\u0437\u043d\u0456 \u0442\u0438\u043f\u0438 \u0434\u0430\u043d\u0438\u0445.<\/p>\n<p>\u042f\u043a\u0449\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u044f\u0432\u043d\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0442\u0438\u043f \u0434\u0430\u043d\u0438\u0445 \u0437\u043c\u0456\u043d\u043d\u043e\u0457, \u0442\u043e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0430 \u0437\u043b\u0456\u0432\u0430 \u0432\u0456\u0434 \u0456\u043c\u0435\u043d\u0456 \u0437\u043c\u0456\u043d\u043d\u0456\u0439 \u0432 \u043a\u0440\u0443\u0433\u043b\u0438\u0445 \u0434\u0443\u0436\u043a\u0430\u0445 \u0432\u043a\u0430\u0437\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u0442\u0438\u043f:<\/p>\n<pre class=\"prettyprint linenums\">\r\n<span class=\"hljs-preprocessor\">&lt;?php\r\n<\/span><span class=\"hljs-variable\">$str<\/span> = <span class=\"hljs-string\">\"50000\"<\/span>; <span class=\"hljs-comment\">\/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f String\r\n\r\n<span class=\"hljs-variable\">$new_str<\/span> = (integer) <span class=\"hljs-variable\">$str<\/span>; \/\/ \u0422\u0435\u043f\u0435\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0441\u0442\u0430\u043b\u043e Integer\r\n\r\n\/\/ \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u044f\u0454\u043c...\r\n\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-variable\">$new_str<\/span> + <span class=\"hljs-variable\">$new_str<\/span>; <span class=\"hljs-preprocessor\">?&gt;<\/span><\/span><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456:<\/p>\n<pre class=\"result\">100000<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u0454 \u043c\u043e\u0432\u043e\u044e \u0434\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u043e\u0457 \u0442\u0438\u043f\u0456\u0437\u0430\u0446\u0456\u0457, \u0442\u0438\u043f \u0437\u043c\u0456\u043d\u043d\u043e\u0457 \u0432\u0438\u0437\u043d\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0457\u0457 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f. \u0410\u043b\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0442\u0440\u0435\u0431\u0430 \u0437\u043d\u0430\u0442\u0438, \u044f\u043a\u0456 \u0442\u0438\u043f\u0438 \u0434\u0430\u043d\u0438\u0445 \u0456\u0441\u043d\u0443\u044e\u0442\u044c \u0432 PHP. \u041d\u0438\u0436\u0447\u0435 \u043f\u0435\u0440\u0435\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0456 \u0443\u0441\u0456 \u0442\u0438\u043f\u0438, \u044f\u043a\u0456 \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438 \u0432 PHP: Boolean. \u0426\u0435 \u043b\u043e\u0433\u0456\u0447\u043d\u0438\u0439 \u0442\u0438\u043f, \u044f\u043a\u0438\u0439 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f true \u0430\u0431\u043e false. Integer. \u041c\u0456\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0446\u0456\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 (\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434: 4 \u0430\u0431\u043e 10, \u0430\u0431\u043e \u0456\u043d\u0448\u0435 \u0446\u0456\u043b\u0435 \u0447\u0438\u0441\u043b\u043e). String. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-494","post","type-post","status-publish","format-standard","hentry","category-zminni"],"_links":{"self":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/comments?post=494"}],"version-history":[{"count":1,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/494\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/494\/revisions\/495"}],"wp:attachment":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/media?parent=494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/categories?post=494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/tags?post=494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}