<?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>Sun, 19 May 2013 01:35:42 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPBuilder.com: BitMasks: Emulate Unix Permissions in PHP (Quickly)]]></title>
      <guid>http://www.phpdeveloper.org/news/5995</guid>
      <link>http://www.phpdeveloper.org/news/5995</link>
      <description><![CDATA[<p>
Permissions in Unix-based systems have become one of the standard models for development all over the world. They're simple to learn and use while being extremely powerful at the same time. In <a href="http://www.phpbuilder.com/columns/eric_potvin20060809.php3">this new article</a> (as contributed by <i>Eric Potvin</i>) from PHPBuilder.com today, they bring this power to the realm of PHP with bitmasks.
</p>
<blockquote>
Bitmasking is a very useful method to emulate Unix-style file permissions (read/write/execute for example). What's nice about a PHP implementation is that you can configure your own bitmasks and use them for any kind of permissions in your scripts and applications. The implementation is relatively simple as well.
</blockquote>
<p>
They <a href="http://www.phpbuilder.com/columns/eric_potvin20060809.php3">start by defining</a> a few of the permission levels (add/delete/denied) in PHP constants before showing the bitMask() function you can use to check a user's permissions. They also include some simple pseudo-code to show how it's used. For more information, check out the <a href="http://www.gen-x-design.com/archives/bitmasks-emulate-unix-permissions-in-php">complete article here</a>.
</p>]]></description>
      <pubDate>Wed, 09 Aug 2006 16:01:53 -0500</pubDate>
    </item>
  </channel>
</rss>
