<?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>Tue, 06 Jan 2009 03:54:10 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jordi Boggiano's Blog: Multiton base class]]></title>
      <guid>http://www.phpdeveloper.org/news/11641</guid>
      <link>http://www.phpdeveloper.org/news/11641</link>
      <description><![CDATA[<p>
In <a href="http://seld.be/notes/multiton-base-class">this recent post</a> <i>Jordi Boggiano</i> looks at a different sort of design pattern - a sort of extension of the Singleton pattern: Multition.
</p>
<blockquote>
While I like the <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a> pattern every now and then, I prefer the flexibility that the <a href="http://en.wikipedia.org/wiki/Multiton">Multiton</a> potentially offers, and well it's just an extended version of the Singleton, so it's "compatible" with the Singleton model. Anyway, to the point, PHP5.3 is coming, and with Late Static Binding you can do a base Multiton (or Singleton if you insist), which wasn't possible before. Now I like this very much because you can simply extend it rather than rewriting those (few, I know, but still) lines each time. 
</blockquote>
<p>
Included in <a href="http://seld.be/notes/multiton-base-class">the post</a> is an example of the design pattern showing how to create its structure in the class and use it to grab the same or unique instances (defined with an ID).
</p>]]></description>
      <pubDate>Tue, 30 Dec 2008 11:17:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Data structures in PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/11633</guid>
      <link>http://www.phpdeveloper.org/news/11633</link>
      <description><![CDATA[<p>
Continuing on his his series looking at improvements in the upcoming PHP 5.3 release, <i>Johannes Schluter</i> uses <a href="http://schlueters.de/blog/archives/90-Data-structures-in-PHP-5.3.html">this new post</a> to look at some of the new data structures their update will have to offers in the Standard PHP Library.
</p>
<blockquote>
In the programming world there are quite a few well understood and explored data structures. Which are commonly used in tons of applications, still the only things PHP offered till 5.3 in regards to structuring data were arrays (more precise: hash tables) and objects. So people had to either abuse them for other structures or implement the structures themselves on top of these. Thanks to Etienne things now are changing and PHP's <a href="http://php.net/spl">Standard PHP Library</a> (SPL) extension will offer quite a few standard implementations of data structures. 
</blockquote>
<p>
These new data structures are SplDoublyLinkedList, SplStack, SplQueue/SplPirorityQueue, SplHeap/SplMinHeap/SplMaxHeap and SplFixedArray. He explains a bit of what they are and more detail on one specifically - SplFixedArray.
</p>]]></description>
      <pubDate>Mon, 29 Dec 2008 11:19:28 -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[Arpad Ray's Blog: The adventure of PHP and the magic quotes]]></title>
      <guid>http://www.phpdeveloper.org/news/11589</guid>
      <link>http://www.phpdeveloper.org/news/11589</link>
      <description><![CDATA[<p>
One of the things that's been hanging around PHP's neck since its early days is the magic_quotes setting that was introduces to try to make things easier. In <a href="http://arpad.co.uk/2008/09/the-adventure-of-php-and-the-magic-quotes/">this interesting post</a> <i>Arpad Ray</i> takes a look at this setting and why its a bad thing for PHP to have around.
</p>
<blockquote>
Like register_globals, it helped lower the barrier of entry to building a dynamic website by removing some of the complexity. However it certainly wasn't without sacrifice, problems with the implementation quickly appeared and continued to abound for the next ten years. Finally in PHP 5.2.2 we got an implementation which (as far as its intentions went) seemed to be bug free, but of course by then it was turned off by default and was already slated to be dropped in PHP 6.
</blockquote>
<p>
He looks at a few reasons they're bad (not good enough for escaping, inconsistent, performance issues) and some methods - code snippets - on how to deal with it being turned on on your server.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 12:03:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuiilder.com: Using Get and Post Methodology in AJAX Applications]]></title>
      <guid>http://www.phpdeveloper.org/news/11587</guid>
      <link>http://www.phpdeveloper.org/news/11587</link>
      <description><![CDATA[<p>
On the PHPBuilder.com site <i>Anthony Corbelli</i> has <a href="http://www.phpbuilder.com/columns/acorbelli20081215.php3">a new tutorial</a> looking at the differences between using GET and POST in the context of an Ajax-enabled application.
</p>
<blockquote>
GET is typically used when you simply need to retrieve data and POST is used when you want to change the state of the server (i.e. send/update data on the server). This article will discuss how we use GET and POST methodology in our Ajax applications!
</blockquote>
<p>
Complete code for his examples is included - both the Javascript and PHP sides. His example handles both GET and POST requests the same way, returning the city and zip information.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 10:21:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: A hidden gem in PHP 5.3: fileinfo]]></title>
      <guid>http://www.phpdeveloper.org/news/11586</guid>
      <link>http://www.phpdeveloper.org/news/11586</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has pointed out a "hidden gem" for PHP 5.3 in his <a href="http://schlueters.de/blog/archives/92-A-hidden-gem-in-PHP-5.3-fileinfo.html">latest blog post</a> - the <a href="http://php.net/fileinfo">fileinfo extension</a>.
</p>
<blockquote>
This series is not meant to be complete but some personal choice, these blog postings are also no replacement for documentation, but just pointers. My goal is that you try out 5.3 right now so we can fix bugs as soon as possible before releasing it  The NEWS file has a quite short entry for my first subject: Added fileinfo extension as replacement for mime_magic extension. (Derick)
</blockquote>
<p>
He looks at one situation where <a href="http://php.net/fileinfo">the extension</a> could come in very handy - getting the content type of the file for a download push - as well as why its better than the older mime_content_type function.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 09:35:59 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gopal Vijayaraghavan's Blog: APC 3.1.2 Released!]]></title>
      <guid>http://www.phpdeveloper.org/news/11585</guid>
      <link>http://www.phpdeveloper.org/news/11585</link>
      <description><![CDATA[<p>
On his blog today <i>Gopal Vijayaraghavan</i> has <a href="http://t3.dotgnu.info/blog/php/apc-3.1.2.html">posted about</a> the release of the latest version of the APC sofware (Alternative PHP Cache) - version 3.1.2.
</p>
<blockquote>
Finally, after nearly a year of work, it's into a release. Some new stuff has sneaked into it undocumented, that people might find interesting - apc.preload_path would be one of them. The backend memory allocation has been re-done - the api part by me and the internals by shire. There's a hell of a lot of new code in there, both rewritten and added. Tons of php4 cruft removed, php5 stuff optimized, made more stable, then less stable, made faster, then applied brakes. Made leak-proof, quake-proof and in general, idiot-proof. So, on & so forth.
</blockquote>
<p>
To show the difference, he includes a diff of the current version against the previous - 68 files changed, 3255 insertions and 5545 deletions.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 08:47:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Data filtering with PHP's Filter extension]]></title>
      <guid>http://www.phpdeveloper.org/news/11581</guid>
      <link>http://www.phpdeveloper.org/news/11581</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has a <a href="http://robertbasic.com/blog/data-filtering-with-php-filter-extension/">new blog post</a> looking at the filtering extension included with most PHP5 distributions.
</p>
<blockquote>
Filter extension? Maybe it's nothing new for some of you, but it is for me. I've never heard of it before. So I quickly hopped over to PHP.net and the <a href="http://www.php.net/manual/en/book.filter.php">Filter chapter</a> of the manual.
</blockquote>
<p>
The filter extension (included as of PHP 5.2) helps clean up and validate user input - really any input - like number matching, regular expressions and email addresses. He includes some examples of filtering strings, email and integers as well as ways to sanitize the same strings, ensuring they are valid and clean values.
</p>]]></description>
      <pubDate>Tue, 16 Dec 2008 11:17:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott MacVicar's Blog: Accessing pseudo random data with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11571</guid>
      <link>http://www.phpdeveloper.org/news/11571</link>
      <description><![CDATA[<p>
To help alleviate some <a href="http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/">recent complaints</a> about the pseudo-random nature of the random functions in PHP, <i>Scott MacVicar</i> has proposed an <a href="http://www.macvicar.net/blog/2008/12/accessing-pseudo-random-data-with-php.html">alternate solution</a>:
</p>
<blockquote>
With all these potential different ways to get some pseudo random data it would be hard to do this in native PHP. Now we could do this in C and implement all the code ourselves but why risk implementing our own random functions and potentially making a mistake? The answer is OpenSSL, we already have an OpenSSL module and obviously they have some random functionality built in for when you go to generate SSL certificates.
</blockquote>
<p>
You can make a call to the openssl_random_pseudo_bytes (in PHP 5.3) to grab the number of bytes you need and pass in a "strong" value to get a more cryptographically secure value.
</p>]]></description>
      <pubDate>Mon, 15 Dec 2008 10:24:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Vidyut Luther's Blog: Adding Subscribers to Campaign Monitor Lists using PHP5 and SOAP]]></title>
      <guid>http://www.phpdeveloper.org/news/11570</guid>
      <link>http://www.phpdeveloper.org/news/11570</link>
      <description><![CDATA[<p>
If you're a <a href="http://www.campaignmonitor.com/">Campaign Monitor</a> user (an email marketing tool targeted at designers) and have wanted to dynamically add people to your lists, <i>Vidyut Luther</i> has <a href="http://www.phpcult.com/blog/campaign-monitor-php5-soap/">a solution</a> for you:
</p>
<blockquote>
This is a quick how to, for people interested in adding subscribers to their  Campaign Monitor  lists. What you'll need: PHP 5 with SOAP built in, a Valid Campaign Monitor Account, a Campaign Monitor list.
</blockquote>
<p>
His simple script (about 10 lines with comments removed) makes a call to the service's API and passes in your key, a list and client ID and a call to the AddSubscriber method to push the new contact into the list.
</p>]]></description>
      <pubDate>Mon, 15 Dec 2008 09:33:07 -0600</pubDate>
    </item>
  </channel>
</rss>
