
{"id":3917,"date":"2020-07-15T17:46:42","date_gmt":"2020-07-15T09:46:42","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=3917"},"modified":"2020-07-15T17:46:42","modified_gmt":"2020-07-15T09:46:42","slug":"overloading","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=3917","title":{"rendered":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09"},"content":{"rendered":"<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div><div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\n<p>\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002<\/p>\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">\n\/\/__call \u547c\u53eb\u5230\u4e0d\u5b58\u5728\u7684\u65b9\u6cd5\u5f8c \u6703\u89f8\u767c\u5230\u6b64\u65b9\u6cd5\nclass People {\n\tprivate $height;\/\/\u8eab\u9ad8\n\tprivate $weight;\/\/\u9ad4\u91cd\n\tprivate $sex;\/\/\u59d3\u5225 \u8981\u6539\u6210 \u4fdd\u8b77 \u5b50\u985e\u5225\u624d\u53ef\u4ee5\u8b8a\u66f4\u5b83\u7684\u503c\n\tfunction __call($fun, $args) {\n\t\t$count=count($args);\n        switch($fun) {\n\t\t\tcase 'set':\n\t\t\t\tswitch($count){\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tif (is_int($args[0]) &amp;&amp; is_int($args[1]) &amp;&amp; is_string($args[2])) { \/\/ \u6578\u5b57,\u6578\u5b57,\u5b57\u4e32 \u53c3\u6578\u7684\u683c\u5f0f\n\t\t\t\t\t\t\t$this->height=$args[0];\n\t\t\t\t\t\t\t$this->weight=$args[1];\n\t\t\t\t\t\t\t$this->sex   =$args[2];\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tif (is_int($args[0]) &amp;&amp; is_int($args[1])) { \/\/ \u6578\u5b57,\u6578\u5b57 \u53c3\u6578\u7684\u683c\u5f0f\n\t\t\t\t\t\t\t$this->height=$args[0];\n\t\t\t\t\t\t\t$this->weight=$args[1];\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tif (is_int($args[0]) ) { \/\/ \u6578\u5b57 \u53c3\u6578\u7684\u683c\u5f0f\n\t\t\t\t\t\t\t$this->height=$args[0];\n\t\t\t\t\t\t}break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$this->height=0;\n\t\t\t\t\t\t\t$this->weight=0;\n\t\t\t\t\t\t\t$this->sex   ='male';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'get':\/\/\u53d6\u5f97\u4e09\u500b\u53c3\u6578\n\t\t\t\treturn '&lt;br>jeff \u7684\u8eab\u9ad8\u662f\uff1a'.$this->height.\n\t\t\t\t\t   '&lt;br>jeff \u7684\u9ad4\u91cd\u662f\uff1a'.$this->weight.\n\t\t\t\t\t   '&lt;br>jeff \u7684\u59d3\u5225\u662f\uff1a'.$this->sex.'&lt;br>';\n\t\t\tdefault:\n\t\t\t\techo '\u627e\u4e0d\u5230'.$fun.'\u9019\u500b\u65b9\u6cd5' ;\n        }\n    }\n}\n$jeff = new People();\necho '&lt;br>\u5e36\u4e09\u500b\u53c3\u6578&lt;br>';\n$jeff->set(170,65,'male');\necho $jeff->get();\necho '&lt;br>\u5e36\u5169\u500b\u53c3\u6578&lt;br>';\n$jeff->set(180,70);\/\/\u53ea\u8b8a\u66f4 \u8eab\u9ad8 \u9ad4\u91cd\necho $jeff->get();\necho '&lt;br>\u5e36\u4e00\u500b\u53c3\u6578&lt;br>';\n$jeff->set(190);\/\/\u53ea\u8b8a\u66f4 \u8eab\u9ad8\necho $jeff->get();\necho '&lt;br>\u7b2c\u4e00\u500b\u53c3\u6578\u975e\u6578\u5b57\u6642&lt;br>';\n$jeff->set('abc',99,'female');\/\/\u9019\u88e1\u7684\u503c\u5c31\u4e0d\u6703\u5beb\u9032\u53bb\necho $jeff->get();\/\/\u8b80\u53d6\u6642\u6703\u8b80\u5230\u6700\u5f8c\u4e00\u6b21\u7570\u52d5\u7684\u503c\necho '&lt;br>\u5176\u5b83\u975e get set \u4e4b\u5916\u7684\u65b9\u6cd5&lt;br>';\n$jeff->gcc();\n\/\/\u986f\u793a\u7d50\u679c\n\/*\n\u5e36\u4e09\u500b\u53c3\u6578\njeff \u7684\u8eab\u9ad8\u662f\uff1a170\njeff \u7684\u9ad4\u91cd\u662f\uff1a65\njeff \u7684\u59d3\u5225\u662f\uff1amale\n\u5e36\u5169\u500b\u53c3\u6578\njeff \u7684\u8eab\u9ad8\u662f\uff1a180\njeff \u7684\u9ad4\u91cd\u662f\uff1a70\njeff \u7684\u59d3\u5225\u662f\uff1amale\n\u5e36\u4e00\u500b\u53c3\u6578\njeff \u7684\u8eab\u9ad8\u662f\uff1a190\njeff \u7684\u9ad4\u91cd\u662f\uff1a70\njeff \u7684\u59d3\u5225\u662f\uff1amale\n\u7b2c\u4e00\u500b\u53c3\u6578\u975e\u6578\u5b57\u6642\njeff \u7684\u8eab\u9ad8\u662f\uff1a190\njeff \u7684\u9ad4\u91cd\u662f\uff1a70\njeff \u7684\u59d3\u5225\u662f\uff1amale\n\u5176\u5b83\u975e get set \u4e4b\u5916\u7684\u65b9\u6cd5\n\u627e\u4e0d\u5230gcc\u9019\u500b\u65b9\u6cd5\n*\/<\/pre>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2201,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[48,36],"tags":[49,429,434,448,765],"class_list":["post-3917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oop","category-php","tag-__call","tag-oop","tag-overloading","tag-php","tag-765"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a<\/title>\n<meta name=\"description\" content=\"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webteach.tw\/?p=3917\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"og:description\" content=\"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webteach.tw\/?p=3917\" \/>\n<meta property=\"og:site_name\" content=\"\u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T09:46:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"454\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"jeff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"jeff\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917\"},\"author\":{\"name\":\"jeff\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"headline\":\"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09\",\"datePublished\":\"2020-07-15T09:46:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917\"},\"wordCount\":6,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/1-1.png\",\"keywords\":[\"__call\",\"oop\",\"overloading\",\"php\",\"\u591a\u8f09\"],\"articleSection\":[\"OOP\",\"PHP\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917\",\"name\":\"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/1-1.png\",\"datePublished\":\"2020-07-15T09:46:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"description\":\"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=3917\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#primaryimage\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/1-1.png\",\"contentUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/1-1.png\",\"width\":680,\"height\":454,\"caption\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3917#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/www.webteach.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/\",\"name\":\"\u6df7\u6c34\u6478\u9b5a\",\"description\":\"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webteach.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\",\"name\":\"jeff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"caption\":\"jeff\"},\"sameAs\":[\"http:\\\/\\\/35.72.55.111\"],\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?author=1\"},false]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a","description":"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webteach.tw\/?p=3917","og_locale":"zh_TW","og_type":"article","og_title":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a","og_description":"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002","og_url":"https:\/\/www.webteach.tw\/?p=3917","og_site_name":"\u6df7\u6c34\u6478\u9b5a","article_published_time":"2020-07-15T09:46:42+00:00","og_image":[{"width":680,"height":454,"url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png","type":"image\/png"}],"author":"jeff","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"jeff","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"1 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webteach.tw\/?p=3917#article","isPartOf":{"@id":"https:\/\/www.webteach.tw\/?p=3917"},"author":{"name":"jeff","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"headline":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09","datePublished":"2020-07-15T09:46:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=3917"},"wordCount":6,"commentCount":0,"image":{"@id":"https:\/\/www.webteach.tw\/?p=3917#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png","keywords":["__call","oop","overloading","php","\u591a\u8f09"],"articleSection":["OOP","PHP"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webteach.tw\/?p=3917#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webteach.tw\/?p=3917","url":"https:\/\/www.webteach.tw\/?p=3917","name":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09 - \u6df7\u6c34\u6478\u9b5a","isPartOf":{"@id":"https:\/\/www.webteach.tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=3917#primaryimage"},"image":{"@id":"https:\/\/www.webteach.tw\/?p=3917#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png","datePublished":"2020-07-15T09:46:42+00:00","author":{"@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"description":"\u4e0a\u4e00\u7bc7\u4ecb\u7d39\u4e86 \u9b54\u8853\u65b9\u6cd5 __call \uff0c\u9664\u4e86\u7576\u9632\u5446\u4e4b\u5916\u9084\u53ef\u4ee5\u62ff\u4f86\u5be6\u73fe overloading \u591a\u8f09\uff0c\u5148\u7c21\u55ae\u4ecb\u7d39\u4e00\u4e0b\u591a\u8f09\u662f\u4ec0\u9ebc\uff0c\u5c31\u662f\u540c\u4e00\u500b\u65b9\u6cd5 \u6703\u56e0\u70ba\u6240\u8f09\u5165\u7684\u53c3\u6578\u7684\u4e0d\u540c\u800c\u53bb\u505a\u4e0d\u4e00\u6a23\u7684\u52d5\u4f5c\u3002","breadcrumb":{"@id":"https:\/\/www.webteach.tw\/?p=3917#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webteach.tw\/?p=3917"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.webteach.tw\/?p=3917#primaryimage","url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png","contentUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2017\/12\/1-1.png","width":680,"height":454,"caption":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.webteach.tw\/?p=3917#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/www.webteach.tw\/"},{"@type":"ListItem","position":2,"name":"[ PHP ] \u2013 OOP 9 \u5229\u7528 __call \u4f86\u5be6\u73fe overloading \u591a\u8f09"}]},{"@type":"WebSite","@id":"https:\/\/www.webteach.tw\/#website","url":"https:\/\/www.webteach.tw\/","name":"\u6df7\u6c34\u6478\u9b5a","description":"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webteach.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Person","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520","name":"jeff","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","caption":"jeff"},"sameAs":["http:\/\/35.72.55.111"],"url":"https:\/\/www.webteach.tw\/?author=1"},false]}},"views":760,"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3917"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/2201"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}