<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anon_193</author_name>
  <author_url>https://blog.hatena.ne.jp/anon_193/</author_url>
  <blog_title>めらんこーど地階</blog_title>
  <blog_url>https://anon-193.hatenadiary.org/</blog_url>
  <categories>
    <anon>php</anon>
  </categories>
  <description>急遽、rubyで言うArray#selectをphpで実現する必要が出てきた。 さらさらっと調べてみると、PHP Manualにarray_filterなる、そのものズバリな関数を見つけることが出来た。 しかし、サンプルを観てみると、どうも評価値に違和感が。 $array2 = array(6, 7, 8, 9, 10, 11, 12);に対して、偶数フィルタを通した評価値が、 Array ( [0] =&gt; 6 [2] =&gt; 8 [4] =&gt; 10 [6] =&gt; 12 )となっている。インデックスを見てみると、除外された部分が歯抜けになって返ってきている。print_rの表示からして、まさかp…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanon-193.hatenadiary.org%2Fentry%2F20091101%2F1257076854&quot; title=&quot;array_filterで配列要素のインデックスが歯抜けになる - めらんこーど地階&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-11-01 21:00:54</published>
  <title>array_filterで配列要素のインデックスが歯抜けになる</title>
  <type>rich</type>
  <url>https://anon-193.hatenadiary.org/entry/20091101/1257076854</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
