<?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, 18 May 2013 12:27:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Scalar Type Hints in PHP 5.3.99]]></title>
      <guid>http://www.phpdeveloper.org/news/15484</guid>
      <link>http://www.phpdeveloper.org/news/15484</link>
      <description><![CDATA[<p>
In the theme of <a href="http://phpdeveloper.org/news/15476">other recent posts</a> mentioning the scalar type hinting that has been included in the main line of code that is headed towards the next PHP release, <i>Sebastian Bergmann</i> <a href="http://sebastian-bergmann.de/archives/900-Scalar-Type-Hints-in-PHP-5.3.99.html">has a new post</a> about their inclusion in PHP 5.3.99 (yes, that's PHP 5.4) and the new syntax it introduces.
</p>
<blockquote>
In a nutshell, this means that PHP 5.3.99 introduces new syntax -- scalar type hints -- but no new semantics. The latter can either be implemented as an extension written in C/C++, in userland PHP code, or in a tool that statically analyzes the code.
</blockquote>
<p>
He includes an example fro userland with a "php_check_parameters" function that looks at the arguments of the current method and uses <a href="http://php.net/reflection">Reflection</a> to check against the type hints for the correct value type.
</p>]]></description>
      <pubDate>Wed, 24 Nov 2010 10:04:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Improved getopt() in PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/11616</guid>
      <link>http://www.phpdeveloper.org/news/11616</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has <a href="http://schlueters.de/blog/archives/93-Improved-getopt-in-PHP-5.3.html">posted about</a> another update to be included in PHP 5.3 - an improved getopt function:
</p>
<blockquote>
So PHP 5.3 has lots of new stuff offer, so let's take a look at one change: Added long-option feature to getopt() and made getopt() available also on win32 systems by adding a common getopt implementation into core. (David Soria Parra, Jani)
</blockquote>
<p>
This gives Windows users a function they haven't had before in both web-based applications and on the command line. You can get more information about the use of the function from <a href="http://php.net/getopt">its page</a> in the manual.
</p>]]></description>
      <pubDate>Tue, 23 Dec 2008 15:02:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeremy Johnstone's Blog: Enums in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11147</guid>
      <link>http://www.phpdeveloper.org/news/11147</link>
      <description><![CDATA[<p>
In <a href="http://www.jeremyjohnstone.com/blog/archives/2008/10/05/enums-in-php/">this new post</a> <i>Jeremy Johnstone</i> looks at creating a class to add that's missing from the basic datatype set of the language - enums.
</p>
<blockquote>
I stumbled across a blog post on <a href="http://it.toolbox.com/blogs/macsploitation/enums-in-php-a-native-implementation-25228">how to implement Enums in PHP via userland code</a> written by Jonathan Hohle. I liked the concept he had, but the implementation was a bit unappealing because it used eval() among other more minor issues. You shouldn't need to generate Enums at runtime, so I took that as a challenge to find a way to do it at compile time, thus making the code much more efficient.
</blockquote>
<p>
His enums would support type hinting and would, ideally, be iterable. He gives the code he's worked up - a base class, another than extends it to make a basic enum structure and some handy changes to support comparisons. A few more changes (and a few other extended classes later) he has some pretty well functioning enums that can even bee iterated through.
</p>]]></description>
      <pubDate>Mon, 06 Oct 2008 07:56:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Addiction Blog: PHP - No Container libraries?]]></title>
      <guid>http://www.phpdeveloper.org/news/9158</guid>
      <link>http://www.phpdeveloper.org/news/9158</link>
      <description><![CDATA[<p>
On the PHP Addiction blog today, there's <a href="http://www.phpaddiction.com/tags/uncategorized/php-no-container-libraries/">a new post</a> where <i>Doug Hill</i> asks a question of his fellow developers - are there advantages to having a standard container library for PHP?
</p>
<blockquote>
Most compiled languages that I have used have some kind of container implementation, Lists, Maps, Trees, Stacks and all their many variations. PHP has arrays and the <a href="http://www.php.net/~helly/php/ext/spl/">SPL</a>.
</blockquote>
<p>
The only problem he's noted so far is that containers made in userland would be slower than ones created natively. A comment from <i>Antony Dovgal</i> points out <a href="http://cvs.php.net/viewvc.cgi/pecl/adt/">a project similar</a> to what he's looking for that's already in the works.
</p>]]></description>
      <pubDate>Mon, 03 Dec 2007 10:27:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Userland Naming Guide Launched]]></title>
      <guid>http://www.phpdeveloper.org/news/6029</guid>
      <link>http://www.phpdeveloper.org/news/6029</link>
      <description><![CDATA[<p>
An <a href="http://www.php.net/manual/en/userlandnaming.php">official guide</a> to choosing names for identifiers in userland has been added to the PHP manual on PHP.net. In <a href="http://pooteeweet.org/blog/466">his latest post</a>, <i>Lukas Smith</i> talks about it:
</p>
<blockquote>
<p>
So now we finally have some guidelines on how users should name their identifiers to be fairly future proof. This should hopefully help reduce the amount of pain people suffer when PHP adds new features like a class for Date or File handling. Although the two mentioned examples have settled on using DateTime and FileObject to get around the issue at least partially.
</p>
<p>
The <a href="http://www.php.net/manual/en/userlandnaming.php">guide itself</a> is unfortunately spread over 3 pages, which does not seem to make sense since there is really not that much content there yet. Then again the guide may get expanded in the future. Anyways I recommend that every serious PHP programmer have a look at the guide. If there are any issues please let me (or the PHPDoc team) know. Otherwise make sure you adapt your internal CS to match this guide.
</p>
</blockquote>
<p>
The guide talks about the naming of items in the global namespace (functions, classes, interfaces, etC), some rules to follow for internal identifiers, and some quick tips on naming to create pseudo-namespaces.
</p>]]></description>
      <pubDate>Mon, 14 Aug 2006 11:37:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jacob Santos' Blog: My Love For Array Object Idiocy]]></title>
      <guid>http://www.phpdeveloper.org/news/5956</guid>
      <link>http://www.phpdeveloper.org/news/5956</link>
      <description><![CDATA[<p>
In his <a href="http://www.santosj.name/?p=262">latest blog entry</a>, <i>Jacob Santos</i> looks at objects and his seeming faciation with every little thing they do - specifically the Array objects.
</p>
<blockquote>
I suppose I'm fixated on objects, but damn it, they are awesome. Recently, I've been thinking of creating a framework that takes array and file functions and creates a class wrapper around them. It would have been nice if PHP offered an object for handling Arrays and Files. SPL does manage some sorting for arrays, but I would like to fully manage arrays through the internal Array methods.
</blockquote>
<p>
He <a href="http://www.santosj.name/?p=262">dives deeper</a> into the Array objects, looking at how to use them, appending them to each other, how much overhead making the object causes (testing), and the results of those tests.
</p>]]></description>
      <pubDate>Fri, 04 Aug 2006 06:24:51 -0500</pubDate>
    </item>
  </channel>
</rss>
