{"id":23,"date":"2008-04-04T15:31:53","date_gmt":"2008-04-04T15:31:53","guid":{"rendered":"http:\/\/tw.newtonstudio.com\/?p=23"},"modified":"2008-04-04T15:34:36","modified_gmt":"2008-04-04T15:34:36","slug":"php%e7%89%a9%e4%bb%b6%e5%b0%8e%e5%90%91","status":"publish","type":"post","link":"http:\/\/tw.newtonstudio.com\/?p=23","title":{"rendered":"PHP\u7269\u4ef6\u5c0e\u5411"},"content":{"rendered":"<p>\u5c0dPHP\u7684\u7269\u4ef6\u5c0e\u5411\u7a0b\u5f0f\u8a2d\u8a08\u662f\u5426\u4e00\u7c4c\u83ab\u5c55?<br \/>\n\u5176\u5be6\u5beb\u4e45\u4e86PHP\u7684\u7db2\u9801\u7a0b\u5f0f, \u4f60\u6703\u767c\u73fe\u5c07\u7a0b\u5f0f\u5305\u6210\u4e00\u500b\u500bCLASS\u6703\u6bd4\u8d77\u4f60\u5728\u500b\u5225\u7684\u7db2\u9801\u5bebFUNCTION\u4f86\u5f97\u66f4\u5177\u898f\u756b\u6027, \u5148\u5c07\u60a8\u7684\u7db2\u9801\u898f\u5283\u6210\u4e00\u500b\u500b\u7269\u4ef6, \u6bcf\u500b\u7269\u4ef6\u88e1\u9762\u53c8\u6709\u5c6c\u6027, \u65b9\u6cd5\u7b49. \u4f60\u53ef\u4ee5\u628a\u5b83\u770b\u6210\u662f\u4ee3\u6578\u8a08\u7b97\u6a5f, \u4ee3\u5165\u4e86\u503c\u9032\u53bb, \u7d93\u904e\u8a08\u7b97\u518d\u628a\u7b54\u6848\u4e1f\u51fa\u4f86(\u65b9\u6cd5), \u4f60\u4e5f\u53ef\u4ee5\u628a\u5b83\u770b\u6210\u662f\u4e00\u500b\u76f4\u63a5\u63d0\u4f9b\u503c\u7684\u6771\u897f(\u5c6c\u6027).<\/p>\n<p>\u7269\u4ef6\u5c0e\u5411\u7a0b\u5f0f\u8a2d\u8a08\u8aaa\u96e3\u4e0d\u96e3, \u8aaa\u7c21\u55ae\u5176\u5be6\u4e5f\u4e0d\u7c21\u55ae, \u6700\u5927\u7684\u597d\u8655\u5c31\u662f\u8b93\u4f60\u53ef\u4ee5\u4e0d\u5fc5\u4e00\u76f4\u91cd\u8907\u5beb\u4e00\u4e9b\u4e00\u76f4\u7528\u5230\u7684\u7a0b\u5f0f, \u4ed6\u8ddfINCLUDE\u7684\u89c0\u5ff5\u4e0d\u592a\u76f8\u540c. INCLUDE\u53ea\u662f\u7576\u4f5c\u662f\u6a94\u6848\u7684\u90e8\u5206\u4e1f\u51fa\u4f86, \u4f46CLASS\u7684\u4f7f\u7528\u5247\u662f\u5340\u57df\u6027\u8a08\u7b97.<\/p>\n<p>Object Oriented Programming (OOP) \u6700\u91cd\u8981\u7684\u6982\u5ff5\u6709\u4e09\u7a2e:<\/p>\n<ol>\n<li>\u00a0\u5c01\u88dd (encapsulation)<\/li>\n<li>\u00a0\u7e7c\u627f (Inheritance)<\/li>\n<li>\u00a0\u591a\u578b (Polymorphism)<\/li>\n<\/ol>\n<p>\u8aaa\u7684\u90a3\u9ebc\u591a, \u76f4\u63a5\u770b\u7bc4\u4f8b\u5c31\u4e86\u89e3\u4e86, PHP\u5b98\u7db2\u63d0\u4f9b\u4e86\u4e00\u4e9b\u57fa\u790e\u7684\u7bc4\u4f8b, \u76f8\u4fe1\u8070\u660e\u7684\u4f60\u4e00\u770b\u5c31\u6703\u4e86\u89e3\u4e86 ^_^<\/p>\n<p><a href=\"http:\/\/www.php.net\/manual\/en\/language.oop5.basic.php\">http:\/\/www.php.net\/manual\/en\/language.oop5.basic.php<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0dPHP\u7684\u7269\u4ef6\u5c0e\u5411\u7a0b\u5f0f\u8a2d\u8a08\u662f\u5426\u4e00\u7c4c\u83ab\u5c55? \u5176\u5be6\u5beb\u4e45\u4e86PHP\u7684\u7db2\u9801\u7a0b\u5f0f, \u4f60\u6703\u767c\u73fe\u5c07\u7a0b\u5f0f\u5305\u6210\u4e00\u500b\u500bCLASS\u6703\u6bd4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-php-"],"_links":{"self":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":0,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}