<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hnw</author_name>
  <author_url>https://blog.hatena.ne.jp/hnw/</author_url>
  <blog_title>hnwの日記</blog_title>
  <blog_url>https://hnw.hatenablog.com/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>「PHPの==がキモい件」でも書きましたが、PHPの==は数値っぽいものに対してアバウトな比較を行う演算子です。一方で、他の言語の==演算子は正確な比較を行うものばかりだと思います。他の言語の経験者がPHPのソースコードを読み書きする場合に、PHPの==演算子の挙動を想像することは困難です。つまり、PHPの==演算子の問題点は、他の言語と異なる意味にも関わらず同じ表記を採用していることにあります。見ただけで「アバウトな比較を行う」と想像できれば混乱は避けられるはずです。そこで、PHPにパッチを当て、新たな演算子を導入してみました。 &lt;?php if (&quot;01&quot; ≒ &quot;0x1&quot;) { echo …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhnw.hatenablog.com%2Fentry%2F20090401&quot; title=&quot;PHPの==演算子をわかりやすくするパッチ - hnwの日記&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-04-01 00:00:00</published>
  <title>PHPの==演算子をわかりやすくするパッチ</title>
  <type>rich</type>
  <url>https://hnw.hatenablog.com/entry/20090401</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
