{"id":9912,"date":"2019-03-14T15:02:02","date_gmt":"2019-03-14T06:02:02","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9912"},"modified":"2019-03-14T15:02:15","modified_gmt":"2019-03-14T06:02:15","slug":"php%e3%81%ae%e7%84%a1%e5%90%8d%e9%96%a2%e6%95%b0%e3%82%af%e3%83%ad%e3%83%bc%e3%82%b8%e3%83%a3","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9912","title":{"rendered":"PHP\u306e\u7121\u540d\u95a2\u6570(\u30af\u30ed\u30fc\u30b8\u30e3)\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>PHP\u306e\u7121\u540d\u95a2\u6570(\u30af\u30ed\u30fc\u30b8\u30e3)\u306b\u3064\u3044\u3066\u306e\u307e\u3068\u3081\u3067\u3059\u3002<\/p>\n<p>\u7121\u540d\u95a2\u6570\u3068\u306f<\/p>\n<p>\u7121\u540d\u95a2\u6570\u3068\u306f\u3001\u95a2\u6570\u898f\u5247\u306b\u6cbf\u3063\u3066\u547d\u540d\u3092\u5fc5\u8981\u3068\u305b\u305a\u5b9a\u7fa9\u3067\u304d\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p>function(\u5f15\u6570) {<br \/>\n    \u51e6\u7406\u5185\u5bb9;<br \/>\n}<\/p>\n<p>\u3068\u3044\u3063\u305f\u5f62\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070<\/p>\n<p>$func = function(\u5f15\u6570) {<br \/>\n    \u51e6\u7406\u5185\u5bb9<br \/>\n}<\/p>\n<p>\u3068\u3044\u3063\u305f\u5f62\u3067\u5b9a\u7fa9\u3057\u305f\u5834\u5408\u3001\u3053\u306e$func\u306f\u3001\u30e9\u30e0\u30c0\u95a2\u6570\u3068\u3082\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>$a = $func(\u5f15\u6570);<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u3001\u4f7f\u7528\u3059\u308b\u5834\u6240\u3067\u547c\u3093\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u7121\u540d\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u30e1\u30ea\u30c3\u30c8<\/h2>\n<p>\u7121\u540d\u95a2\u6570\u306f\u6982\u5ff5\u7684\u306b\u306f\u95a2\u6570\u3068\u540c\u3058\u306a\u306e\u3067\u3001\u7121\u540d\u95a2\u6570\u306b\u305b\u305a\u95a2\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u547c\u3073\u51fa\u3057\u3066\u3082\u540c\u3058\u306a\u306e\u3067\u3059\u304c\u3001<br \/>\n\u666e\u901a\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u7121\u540d\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u305d\u306e\u5834\u9650\u308a\u3067\u547c\u3073\u51fa\u3059\u51e6\u7406\u306e\u5834\u5408\u306f\u3001\u95a2\u6570\u540d\u3092\u4ed6\u306e\u95a2\u6570\u540d\u3068\u885d\u7a81\u3057\u306a\u3044\u3067\u6e08\u3080\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5168\u4f53\u304c\u8907\u96d1\u306b\u306a\u3089\u306a\u3044\u3068\u3044\u3063\u305f\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u7121\u540d\u95a2\u6570\u5185\u306e\u51e6\u7406\u306b\u5916\u90e8\u306e\u5909\u6570\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408<\/h2>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u3063\u3066\u306f\u3001\u7121\u540d\u95a2\u6570\u306e\u4e2d\u3067\u4f7f\u7528\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3001\u7121\u540d\u95a2\u6570\u306e\u5916\u306e\u5909\u6570\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u7121\u540d\u95a2\u6570\u306f\u95a2\u6570\u306a\u306e\u3067\u3001\u5f15\u6570\u306b\u3057\u3066\u3044\u308b\u5909\u6570\u4ee5\u5916\u306e\u5916\u90e8\u306e\u5909\u6570\u306f\u5185\u90e8\u306e\u51e6\u7406\u306b\u306f\u9069\u7528\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001use\u6587\u3092\u4f7f\u3046\u3053\u3068\u3067\u305d\u306e\u554f\u984c\u306f\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>$func = function(\u5f15\u6570A) use(\u5909\u6570B) {<br \/>\n    \u51e6\u7406\u5185\u5bb9;<br \/>\n}<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u7121\u540d\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u51e6\u7406\u5185\u5bb9\u3067\u5f15\u6570A\u3060\u3051\u3067\u306a\u304f\u5916\u90e8\u306e\u5909\u6570B\u3082\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u306e\u7121\u540d\u95a2\u6570(\u30af\u30ed\u30fc\u30b8\u30e3)\u306b\u3064\u3044\u3066\u306e\u307e\u3068\u3081\u3067\u3059\u3002 \u7121\u540d\u95a2\u6570\u3068\u306f \u7121\u540d\u95a2\u6570\u3068\u306f\u3001\u95a2\u6570\u898f\u5247\u306b\u6cbf\u3063\u3066\u547d\u540d\u3092\u5fc5\u8981\u3068\u305b\u305a\u5b9a\u7fa9\u3067\u304d\u308b\u95a2\u6570\u3067\u3059\u3002 function(\u5f15\u6570) { \u51e6\u7406\u5185\u5bb9; } \u3068\u3044\u3063\u305f\u5f62\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070 $ [&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-9912","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\/9912","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=9912"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9912\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}