<?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, 21 May 2013 11:37:40 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Taming SplPriorityQueue]]></title>
      <guid>http://www.phpdeveloper.org/news/15760</guid>
      <link>http://www.phpdeveloper.org/news/15760</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has <a href="http://weierophinney.net/matthew/archives/253-Taming-SplPriorityQueue.html">a new post</a> to his blog today looking at one of the tools the <a href="http://php.net/spl">Standard PHP Library (SPL)</a> has to offer developers - the SplPriorityQueue (PHP 5.3+)
</p>
<blockquote>
<a href="http://php.net/SplPriorityQueue">SplPriorityQueue</a> is a fantastic new feature of PHP 5.3. However, in trying to utilize it in a few projects recently, I've run into some behavior that's (a) non-intuitive, and (b) in some cases at least, undesired. In this post, I'll present my solutions.
</blockquote>
<p>
He talks about the "first in, first out" nature of queues and how it differs from a stack (including links to some of the other SPL offerings for both). He then moves into the problems he was seeing - that iteration removes values from the heap and the unexpected order of equal values in the queue. To solve the first problem, he creates an "outer iterator" that creates an "innerQueue" that's protected. The solution for the second issue - the random queue order - is a simple one: priority indexes aren't required to be integers. Strings can be substituted to help make things a bit more unique.
</p>]]></description>
      <pubDate>Tue, 18 Jan 2011 12:43:54 -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[Etienne Kneuss' Blog: SPL Datastructures updated]]></title>
      <guid>http://www.phpdeveloper.org/news/10170</guid>
      <link>http://www.phpdeveloper.org/news/10170</link>
      <description><![CDATA[<p>
<i>Etienne Kneuss</i> has <a href="http://www.colder.ch/news/05-12-2008/32/spl-datastructures-update.html">posted about</a> some updates to the data structures functionality in the Standard PHP Library (SPL), specifically some new additions.
</p>
<blockquote>
There finally is documentation for SplDoublyLinkedList, SplStack and SplQueue and some "new" classes: SplHeap (abstract), SplMaxHeap, SplMinHeap and SplPriorityQueue, documentation of those classes is in progress.
</blockquote>
<p>
An example of the new functionality (for SplPriorityQueue) is included in the post showing the insertion of a value into a pre-existing array (without having to slice or splice!).
</p>]]></description>
      <pubDate>Tue, 13 May 2008 09:31:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hardened-PHP Project: PHP HTML Entity Encoder Heap Overflow Vulnerability]]></title>
      <guid>http://www.phpdeveloper.org/news/6640</guid>
      <link>http://www.phpdeveloper.org/news/6640</link>
      <description><![CDATA[<p>
The Hardened-PHP Project has put out <a href="http://www.hardened-php.net/advisory_132006.138.html">another advisory</a> for the PHP distribution itself, versions 5.1.6/4.4.4 and below dealing with the HTML entity encoder heap.
</p>
<blockquote>
While we were searching for a hole in htmlspecialchars() and htmlentities() to bypass the encoding of certain chars to exploit a possible eval() injection hole in another application we discovered that the implementation contains a possible bufferoverflow that can be triggered when the UTF-8 charset is selected.
</blockquote>
<p>
The issue has been corrected in the latest PHP 5 release - version 5.2 - but is still present in the PHP 4.4 series (they have a recommended patch until the new version is posted). You can get complete information about this issue from <a href="http://www.hardened-php.net/advisory_132006.138.html">the full vulnerability</a> listing.
</p>]]></description>
      <pubDate>Fri, 03 Nov 2006 12:58:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Collections and Sorting Continued]]></title>
      <guid>http://www.phpdeveloper.org/news/5108</guid>
      <link>http://www.phpdeveloper.org/news/5108</link>
      <description><![CDATA[Previously <a href="http://www.phpdeveloper.org/news/5067">from DevShed</a>, they started a series on collections and sorting in PHP. Today, they've posted <a href="http://www.devshed.com/c/a/PHP/Collections-and-Sorting-Continued/">part two</a> of the series that builds on that and looks at sorting algorithm examples.
<p>
<quote>
<i>
This article will examine the primary sorting algorithms with code examples, and some empirical data regarding how they perform in relation to one another, as well as the size of the data set in question.
<p>
We will also create a function to fill up our collection with random data in order to test the sort algorithms with a sufficiently large data set. The sort algorithms listed above are the ones that every computer science student learns in college and are the primary sort algorithms found in real-world applications.
</i>
</quote>
<p>
The sorting styles <a href="http://www.devshed.com/c/a/PHP/Collections-and-Sorting-Continued/">they cover</a> include: bubble sort, heap sort, merge sort, quick sort, and shell sort. For each, they provide the code, making it a simple matter of cut and paste to make it work in your script. There's not a whole lot of documentation going along with the code in this article, but the sorting code is simple enough to understand without it.]]></description>
      <pubDate>Wed, 05 Apr 2006 07:13:17 -0500</pubDate>
    </item>
  </channel>
</rss>
