{"id":625,"date":"2020-05-23T12:33:57","date_gmt":"2020-05-23T09:33:57","guid":{"rendered":"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/?p=625"},"modified":"2020-05-23T12:33:57","modified_gmt":"2020-05-23T09:33:57","slug":"nasliduvannia","status":"publish","type":"post","link":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/nasliduvannia\/","title":{"rendered":"\u041d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f"},"content":{"rendered":"<p>\u041d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u0440\u0438\u0441\u043d\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438, \u043a\u043e\u043b\u0438 \u0432\u0438 \u0440\u043e\u0437\u0448\u0438\u0440\u044e\u0454\u0442\u0435 \u043a\u043b\u0430\u0441, \u0434\u043e\u0447\u0456\u0440\u043d\u0456\u0439 \u043a\u043b\u0430\u0441 \u0443\u0441\u043f\u0430\u0434\u043a\u043e\u0432\u0443\u0454 \u0432\u0441\u0456 \u043f\u0443\u0431\u043b\u0456\u0447\u043d\u0456 (public) \u0456 \u0437\u0430\u0445\u0438\u0449\u0435\u043d\u0456 (protected) \u043c\u0435\u0442\u043e\u0434\u0438 \u0437 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0443. \u0426\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u043c\u0430\u0442\u0438\u043c\u0443\u0442\u044c \u0432\u0438\u0445\u0456\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c \u0434\u043e \u0442\u0438\u0445 \u043f\u0456\u0440, \u043f\u043e\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0456.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0439 \u043f\u0456\u0434\u0445\u0456\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456. \u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0440\u0435\u0430\u043b\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c \u0432 \u0441\u0445\u043e\u0436\u0438\u0445 \u043e\u0431&#8217;\u0454\u043a\u0442\u0430\u0445 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456 \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u044e \u0437\u0430\u0433\u0430\u043b\u044c\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c.<\/p>\n<p>\u0429\u043e\u0431 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0456\u0434 \u0456\u043d\u0448\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0443 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 extends<\/p>\n<p>\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\nclass FirstClass {\r\n\u00a0 \u00a0 \u00a0public $var1 = \"value1\";\r\n\r\n <span class=\"hljs-keyword\">\u00a0 \u00a0 \u00a0protected<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">func1<\/span><span class=\"hljs-params\">()<\/span> <\/span>{\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n<span class=\"hljs-keyword\">\u00a0 \u00a0 \u00a0public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">func2<\/span><span class=\"hljs-params\">()<\/span> <\/span>{\r\n\u00a0 \u00a0 \u00a0}\r\n}\r\n\r\nclass SecondClass extends FirstClass {\r\n\u00a0 \u00a0 \u00a0public $var2 = \"value2\";\r\n}\r\n\r\n$fc = new FirstClass();\r\n$sc = new SecondClass();\r\n\r\necho $fc-&gt;var1; \/\/ value1\r\necho $sc-&gt;var1; \/\/ value1\r\n$sc-&gt;func2(); \/\/ \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\r\necho $sc-&gt;var2; \/\/ value2\r\n?&gt;<\/pre>\n<p>\u042f\u043a\u0449\u043e \u043c\u0438 \u0441\u043f\u0440\u043e\u0431\u0443\u0454\u043c\u043e \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438 \u043c\u0435\u0442\u043e\u0434 <code>$sc -&gt;func1()<\/code>, \u0442\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u043c\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u0443, \u0447\u0435\u0440\u0435\u0437 \u0442\u0435, \u0449\u043e \u043c\u0435\u0442\u043e\u0434 <code>func1<\/code> \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0456 \u044f\u043a <code>protected<\/code>, \u0432\u0456\u043d \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u043d\u0438\u0439 \u0437\u043e\u0432\u043d\u0456.<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$sc-&gt;func1(); \/\/ \u043d\u0435 \u043f\u0440\u0430\u0446\u044e\u0454, \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0445\u0438\u0449\u0435\u043d\u0438\u0439 (protected)\r\n?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u0440\u0438\u0441\u043d\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438, \u043a\u043e\u043b\u0438 \u0432\u0438 \u0440\u043e\u0437\u0448\u0438\u0440\u044e\u0454\u0442\u0435 \u043a\u043b\u0430\u0441, \u0434\u043e\u0447\u0456\u0440\u043d\u0456\u0439 \u043a\u043b\u0430\u0441 \u0443\u0441\u043f\u0430\u0434\u043a\u043e\u0432\u0443\u0454 \u0432\u0441\u0456 \u043f\u0443\u0431\u043b\u0456\u0447\u043d\u0456 (public) \u0456 \u0437\u0430\u0445\u0438\u0449\u0435\u043d\u0456 (protected) \u043c\u0435\u0442\u043e\u0434\u0438 \u0437 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0443. \u0426\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u043c\u0430\u0442\u0438\u043c\u0443\u0442\u044c \u0432\u0438\u0445\u0456\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c \u0434\u043e \u0442\u0438\u0445 \u043f\u0456\u0440, \u043f\u043e\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0456. \u0422\u0430\u043a\u0438\u0439 \u043f\u0456\u0434\u0445\u0456\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456. \u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0440\u0435\u0430\u043b\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c \u0432 \u0441\u0445\u043e\u0436\u0438\u0445 \u043e\u0431&#8217;\u0454\u043a\u0442\u0430\u0445 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456 \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u044e \u0437\u0430\u0433\u0430\u043b\u044c\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c. \u0429\u043e\u0431 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043d\u0430\u0441\u043b\u0456\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0456\u0434 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-625","post","type-post","status-publish","format-standard","hentry","category-oop"],"_links":{"self":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/625","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=625"}],"version-history":[{"count":1,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/625\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/625\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/media?parent=625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/categories?post=625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/tags?post=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}