{"id":80,"date":"2008-01-05T11:56:59","date_gmt":"2008-01-05T02:56:59","guid":{"rendered":"http:\/\/akimoto.jp\/blog\/2008\/01\/05\/php%e3%81%a7%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%82%92%e9%85%8d%e5%88%97%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b%e3%81%ab%e3%81%afget_object_vars\/"},"modified":"2008-01-05T11:56:59","modified_gmt":"2008-01-05T02:56:59","slug":"php%e3%81%a7%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%82%92%e9%85%8d%e5%88%97%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b%e3%81%ab%e3%81%afget_object_vars","status":"publish","type":"post","link":"https:\/\/akimoto.jp\/blog\/2008\/01\/05\/php%e3%81%a7%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%82%92%e9%85%8d%e5%88%97%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b%e3%81%ab%e3%81%afget_object_vars\/","title":{"rendered":"PHP\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u306b\u306fget_object_vars"},"content":{"rendered":"<p>\u3044\u3064\u3082\u95a2\u6570\u540d\u304c\u601d\u3044\u51fa\u305b\u306a\u304f\u306a\u308b\u3051\u3069\u3001\u3069\u3046\u3084\u3063\u3066\u691c\u7d22\u3057\u305f\u3089\u898b\u3064\u304b\u308b\u304b\u3082\u6bce\u56de\u60a9\u3093\u3067\u3057\u307e\u3046\u306e\u3067\u3001\u81ea\u5206\u7528\u306b\u30e1\u30e2\u3002<a href=\"http:\/\/jp.php.net\/manual\/ja\/function.get-object-vars.php\">get_object_vars<\/a>\u3067\u3059\u306d\u3002<\/p>\n<p># \u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u914d\u5217\u306b\u3059\u308b\u300d, &#8220;Object2Array&#8221;<\/p>\n<p>\u6628\u65e5\u306e\u3001SimpleXMLElement\u3092serialize\u3057\u3066\u3082unserialize\u3067\u5143\u306b\u623b\u305b\u306a\u3044\u4ef6\u3067\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3069\u3046\u3057\u3066\u3082serialize\u3092\u4f7f\u3044\u305f\u3044\u3053\u3068\u304b\u3089\u3001SimpleXMLElement\u306e\u4e2d\u306e\u30c7\u30fc\u30bf\u3092\u914d\u5217\u306b\u5909\u63db\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u65b9\u91dd\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e00\u3064\u305a\u3064\u53d6\u3063\u3066\u304d\u3066\u914d\u5217\u3092\u518d\u69cb\u7bc9\u3057\u3066\u3082\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u3053\u306e\u624b\u306e\u51e6\u7406\u306fget_object_vars\u95a2\u6570\u3092\u4f7f\u3048\u3070\u3084\u3063\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u305d\u306e\u65b9\u304c\u9593\u9055\u3044\u304c\u5c11\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001get_object_vars\u306f\u518d\u5e30\u7684\u306b\u914d\u5217\u306b\u3057\u3066\u304f\u308c\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3001SimpleXMLElement\u306e\u8981\u7d20\u306e\u4e2d\u306b\u307e\u305f\u3001SimpleXMLElement\u304c\u3042\u308c\u3070\u3001\u305d\u308c\u306f\u305d\u306e\u307e\u307e\u6b8b\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u4eca\u56de\u306e\u300cserialize\u3055\u305b\u308b\u300d\u3068\u3044\u3046\u76ee\u7684\u3067\u306f\u3053\u308c\u3060\u3051\u3067\u306f\u4e0d\u5341\u5206\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/jp.php.net\/manual\/ja\/function.get-object-vars.php\">PHP\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u30b3\u30e1\u30f3\u30c8<\/a>\u306b\u3082\u3001\u3069\u3046\u3084\u3063\u3066recursive\u306b\u5909\u63db\u3059\u308b\u304b\u3001\u3068\u3044\u3046\u30b3\u30fc\u30c9\u4f8b\u304c\u3044\u308d\u3044\u308d\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001SimpleXMLElement\u3068get_object_vars\u3067\u8abf\u3079\u3066\u51fa\u3066\u304d\u305fIBM developerworks \u306e<a href=\"http:\/\/www.ibm.com\/developerworks\/jp\/xml\/library\/x-xml2jsonphp\/index.html\">PHP \u3067 XML \u3092JSON \u306b\u5909\u63db\u3059\u308b<\/a>\u3092\u53c2\u8003\u306b\u3001define\u3092const\u306b\u76f4\u3059\u306a\u3069\u8abf\u6574\u3092\u3057\u305f\u3082\u306e\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u518d\u5e30\u306e\u6df1\u3055\u3092\u5236\u9650\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.oreilly.co.jp\/books\/4873112915\/toc.html\">PHP Hacks\u306e\u76ee\u6b21<\/a>\u3092\u898b\u308b\u306853. \u4efb\u610f\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u3001\u3068\u3042\u308b\u306e\u3067\u3001\u3053\u308c\u6301\u3063\u3066\u308b\u4eba\u306f\u305f\u3076\u3093\u3053\u3053\u306b\u4f3c\u305f\u3088\u3046\u306a\u8a71\u304c\u8f09\u3063\u3066\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3001\u3068\u3082\u601d\u3044\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3064\u3082\u95a2\u6570\u540d\u304c\u601d\u3044\u51fa\u305b\u306a\u304f\u306a\u308b\u3051\u3069\u3001\u3069\u3046\u3084\u3063\u3066\u691c\u7d22\u3057\u305f\u3089\u898b\u3064\u304b\u308b\u304b\u3082\u6bce\u56de\u60a9\u3093\u3067\u3057\u307e\u3046\u306e\u3067\u3001\u81ea\u5206\u7528\u306b\u30e1\u30e2\u3002get_object_vars\u3067\u3059\u306d\u3002 # \u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u914d\u5217\u306b\u3059\u308b\u300d, &#8220;Object2Array&#038; &hellip; <a href=\"https:\/\/akimoto.jp\/blog\/2008\/01\/05\/php%e3%81%a7%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%82%92%e9%85%8d%e5%88%97%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b%e3%81%ab%e3%81%afget_object_vars\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">PHP\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u306b\u306fget_object_vars<\/span><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121],"tags":[2012,133],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-php","tag-php","tag-133"],"_links":{"self":[{"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":0,"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"wp:attachment":[{"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/akimoto.jp\/blog\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}