<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 07:36:56 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Cody Taylor's Blog: Checking Bits With PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12710</guid>
      <link>http://www.phpdeveloper.org/news/12710</link>
      <description><![CDATA[<p>
<i>Cody Taylor</i> has <A href="http://codytaylor.org/?p=14122">a quick post</a> to his blog about bit checking in PHP:
</p>
<blockquote>
PHP makes life a lot easier for quick or dirty maintenance scripts, cron jobs or web applications but how does it do for older, not so straight forward problems dealing with bits and bytes? I was surprised how easy it was to manipulate bits in a byte with php. Here is an function that made my life a fair amount easier when having to check for a specific bit in a byte.
</blockquote>
<p>
The function takes in the value and, after casting it to an int, checks to see how it compares to eight and returns it. This result can be passed through <a href="http://php.net/decbin">decbin</a> function for output. A handy table of the bitwise operator definitions is also included.
</p>]]></description>
      <pubDate>Thu, 18 Jun 2009 11:12:43 -0500</pubDate>
    </item>
  </channel>
</rss>
