<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iww</author_name>
  <author_url>https://blog.hatena.ne.jp/iww/</author_url>
  <blog_title>揮発性のメモ２</blog_title>
  <blog_url>https://iww.hateblo.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>PHP</anon>
  </categories>
  <description>文字列を変数名とみなして変数にアクセスするやつ JavaScriptのとき developer.mozilla.org 連想配列扱いできる var a = {b:123}; var text = &quot;b&quot;; console.log( a.b ); console.log( a[text] ); PHPのとき www.php.net 可変変数という仕様でアクセスできる { } で囲った文字列が、変数名になる &lt;? $a = new stdClass; $a-&gt;b = 123; $text = &quot;b&quot;; echo $a-&gt;b .&quot;\n&quot;; echo $a-&gt;{$text} .&quot;\n&quot;; // こうも…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20220226%2Fvariables&quot; title=&quot; オブジェクトの要素に変数名でアクセスする - 揮発性のメモ２&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/42132/1577169589465165</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-02-26 20:03:16</published>
  <title> オブジェクトの要素に変数名でアクセスする</title>
  <type>rich</type>
  <url>https://iww.hateblo.jp/entry/20220226/variables</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
