<?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>PHPは暗黙の型変換をしてくれます。 余計なお世話なことが多いですが、適当プログラマには便利な場面もあります。さて、ビット演算。フラグを複数設定したい場合なんかにたまに使いますが、こいつがまた余計なことをしてくれます。 なんと、文字列がビット演算できる！ データ型の変換に注意しましょう。両辺のパラメータが文字列の場合、 ビット演算子は文字の ASCII コードで演算を行います。 PHP: ビット演算子 - Manualどうしてこうなるんだよ！！！！！！ じゃあ、文字列同士じゃない場合は？ 試してみた。 &lt;?php $a = '100'; $b = '20'; $c = 20; $d = 'fo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20091230%2F1262186589&quot; title=&quot;ビット演算子の恐怖 - 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-12-30 00:23:09</published>
  <title>ビット演算子の恐怖</title>
  <type>rich</type>
  <url>https://gom.hatenablog.com/entry/20091230/1262186589</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
