<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gallu</author_name>
  <author_url>https://blog.hatena.ne.jp/gallu/</author_url>
  <blog_title>がるの健忘録</blog_title>
  <blog_url>https://gallu.hatenadiary.jp/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>結論から書くと、マニュアルに書いてある通り search と replace が配列の場合、str_replace() は各配列から値をひとつ取り出し、 subject 上で検索と置換を行うために使用します。 なのですが……ちょっと驚いたので。 端的には、以下のコード。 &lt;?php $s = 'abc'; $r = str_replace(['a', 'b', 'c'], ['ca', 'cb', 'cc'], $s, $count); var_dump($r, $count); $r = str_replace(['c', 'a', 'b'], ['cc', 'ca', 'cb'], $s,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgallu.hatenadiary.jp%2Fentry%2F20170315%2Fp1&quot; title=&quot;str_replace()の第一＆第二引数は、文字列？ 配列？ - がるの健忘録&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>2017-03-15 00:00:00</published>
  <title>str_replace()の第一＆第二引数は、文字列？ 配列？</title>
  <type>rich</type>
  <url>https://gallu.hatenadiary.jp/entry/20170315/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
