{"id":9843,"date":"2018-11-30T10:57:49","date_gmt":"2018-11-30T01:57:49","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9843"},"modified":"2018-11-30T11:05:58","modified_gmt":"2018-11-30T02:05:58","slug":"php%e3%81%ae%e5%8b%89%e5%bc%b7%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9843","title":{"rendered":"PHP\u306e\u52c9\u5f37\u30e1\u30e2"},"content":{"rendered":"<p>PHP\u306b\u3064\u3044\u3066\u306e\u52c9\u5f37\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<h2>namespace(\u540d\u524d\u7a7a\u9593)<\/h2>\n<p>php5\u7cfb\u306e\u9014\u4e2d\u304b\u3089\u5229\u7528\u53ef\u80fd\u306b\u306a\u3063\u305f\u4ed5\u69d8\u3002<\/p>\n<p>namespace \u25ef\u25ef;<\/p>\n<p>\u3067\u540d\u524d\u7a7a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3001\u540c\u540d\u306e\u30af\u30e9\u30b9\u3084\u95a2\u6570\u3082\u5b9a\u7fa9\u3057\u3066\u540c\u6642\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u7570\u306a\u308b\u540d\u524d\u7a7a\u9593\u3067\u540c\u540d\u306e\u30af\u30e9\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u8907\u6570\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304b\u3089\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001<\/p>\n<p>new \u540d\u524d\u7a7a\u9593\u540d\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306b\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<h2>use\u6587\u3067\u306e\u7701\u7565<\/h2>\n<p>\u540d\u524d\u7a7a\u9593\u306f\u3001<\/p>\n<p>namespace \u25ef\u25ef\\\u25ef\u25ef\\\u25ef\u25ef;<\/p>\n<p>\u306e\u3088\u3046\u306b\u3001\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u3053\u308c\u304c\u9577\u304f\u306a\u308b\u3068\u3001<\/p>\n<p>new \u25ef\u25ef\\\u25ef\u25ef\\\u25ef\u25ef\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306a\u304b\u3093\u3058\u3067\u3001\u8a18\u8ff0\u304c\u5197\u9577\u306b\u306a\u308b\u3002<br \/>\n\u8a18\u8ff0\u304c\u8907\u6570\u7b87\u6240\u306b\u306a\u308c\u3070\u306a\u304a\u5197\u9577\u306b\u306a\u308b\u3002<\/p>\n<p>\u3053\u306e\u305f\u3081\u3001use\u6587\u3092\u4f7f\u3046\u3053\u3068\u3067<\/p>\n<p>use \u25ef\u25ef\\\u25ef\u25ef\\\u25ef\u25ef as A<\/p>\n<p>\u306e\u3088\u3046\u306a\u5f62\u3067\u5ba3\u8a00\u3059\u308c\u3070<\/p>\n<p>new A\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u5229\u7528\u3067\u304d\u3001\u8a18\u8ff0\u304c\u7c21\u6f54\u306b\u306a\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u306e\u5ba3\u8a00\u306f\u3044\u308d\u3044\u308d\u306a\u8a18\u8ff0\u304c\u53ef\u80fd\u3067<\/p>\n<p>use \u25ef\u25ef\\\u25ef\u25ef\\\u25ef\u25ef\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u5ba3\u8a00\u3059\u308c\u3070<\/p>\n<p>new \u30af\u30e9\u30b9\u540d\u306e\u3088\u3046\u306a\u304b\u3093\u3058\u3067\u3044\u304d\u306a\u308a\u4f7f\u7528\u3067\u304d\u308b\u4ed6\u3001<\/p>\n<p>use AB\\CD\\EF;<\/p>\n<p>\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u3001as\u3092\u7701\u7565\u3057\u305f\u5834\u5408<\/p>\n<p>use EF\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u8a18\u8ff0\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001<\/p>\n<p>use AB\\CD;<\/p>\n<p>\u306e\u3088\u3046\u306a\u304b\u3093\u3058\u3067\u9014\u4e2d\u307e\u3067\u5b9a\u7fa9\u3057\u3066<\/p>\n<p>new CD\\EF\\\u30af\u30e9\u30b9\u540d;<\/p>\n<p>\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u3082\u3067\u304d\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u308c\u306f\u3001\u30af\u30e9\u30b9\u540d\u3060\u3051\u3067\u306a\u304f\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u5834\u5408\u3082\u540c\u69d8\u306e\u624b\u9806\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<h2>\uff1a\uff1a(\u30b9\u30b3\u30fc\u30d7\u5b9a\u7fa9\u6f14\u7b97\u5b50)<\/h2>\n<p>\u30b9\u30b3\u30fc\u30d7\u5b9a\u7fa9\u6f14\u7b97\u5b50\u306f\u3001\u30af\u30e9\u30b9\u306e\u9759\u7684\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5834\u5408\u306b\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306a\u65b9\u6cd5\u3067\u306f\u3001<\/p>\n<p>\u30af\u30e9\u30b9\u540d->\u30e1\u30bd\u30c3\u30c9;<br \/>\n\u30af\u30e9\u30b9\u540d->\u30d7\u30ed\u30d1\u30c6\u30a3;<\/p>\n<p>\u3068\u3044\u3063\u305f\u66f8\u304d\u65b9\u304c\u3057\u307e\u3059\u304c\u3001\u610f\u5473\u306f\u3053\u308c\u3068\u540c\u3058\u3067<\/p>\n<p>\u30af\u30e9\u30b9\u540d::\u30e1\u30bd\u30c3\u30c9;<br \/>\n\u30af\u30e9\u30b9\u540d::\u30d7\u30ed\u30d1\u30c6\u30a3;<\/p>\n<p>\u3068\u3044\u3063\u305f\u66f8\u304d\u65b9\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u524d\u8005\u306f\u5bfe\u8c61\u304c\u52d5\u7684\u306a\u5834\u5408\u3067\u3001\u5f8c\u8005\u306f\u9759\u7684\u3067\u3042\u308b\u3053\u3068\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3069\u3061\u3089\u3082\u5b9f\u884c\u7d50\u679c\u306f\u540c\u3058\u3067\u3059\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8aad\u307f\u624b\u304c\u3001\u30a2\u30af\u30bb\u30b9\u5148\u304c\u9759\u7684\u3067\u52d5\u7684\u304b\u304c\u898b\u308b\u3068\u5206\u304b\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u306b\u3064\u3044\u3066\u306e\u52c9\u5f37\u30e1\u30e2\u3067\u3059\u3002 namespace(\u540d\u524d\u7a7a\u9593) php5\u7cfb\u306e\u9014\u4e2d\u304b\u3089\u5229\u7528\u53ef\u80fd\u306b\u306a\u3063\u305f\u4ed5\u69d8\u3002 namespace \u25ef\u25ef; \u3067\u540d\u524d\u7a7a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3001\u540c\u540d\u306e\u30af\u30e9\u30b9\u3084\u95a2\u6570\u3082\u5b9a\u7fa9\u3057\u3066\u540c\u6642\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144,131],"tags":[],"class_list":["post-9843","post","type-post","status-publish","format-standard","hentry","category-php-","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9843"}],"version-history":[{"count":1,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9843\/revisions"}],"predecessor-version":[{"id":9844,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9843\/revisions\/9844"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}