<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gom68</author_name>
  <author_url>https://blog.hatena.ne.jp/gom68/</author_url>
  <blog_title>gom68の日記</blog_title>
  <blog_url>https://gom.hatenablog.com/</blog_url>
  <categories>
    <anon>php</anon>
  </categories>
  <description>以前に変数を使って、クラスに対して動的にプロパティを追加してみた。 Objectに動的にプロパティを追加する - うっかりプログラミング日誌今度は動的にメソッドを呼んでみる。*1 &lt;?php class Test1 { public function hoge() { return 1 + 1; } } $test = new Test1(); $method = 'hoge'; $test-&gt;$method(); //=&gt; 2 簡単！ ReflectionClassを使う とはいえ、この方法だと引数が固定数しか取れない。 そこでReflectionMethod#invokeArgsを使う。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090926%2F1253939933&quot; title=&quot;ReflectionClassでメソッドを動的に呼ぶ&amp;amp;ベンチマーク - gom68の日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-09-26 13:38:53</published>
  <title>ReflectionClassでメソッドを動的に呼ぶ&amp;ベンチマーク</title>
  <type>rich</type>
  <url>https://gom.hatenablog.com/entry/20090926/1253939933</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
