<?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 21:14:46 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Software Gunslinger: PHP is meant to die, continued]]></title>
      <guid>http://www.phpdeveloper.org/news/19511</guid>
      <link>http://www.phpdeveloper.org/news/19511</link>
      <description><![CDATA[<p>
In his <a href="http://phpdeveloper.org/news/19417">previous post</a> ("PHP was meant to die") the point was made that PHP isn't really designed as a language to handle long running processes very well. It's made to handle a few operations and then die at the end of the request. In <a href="http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued">this follow up post</a> he talks more about using PHP for long running processes and a library that could help.
</p>
<blockquote>
Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that's not the problem). I also acknowledge that garbage collection works, and is able to take care of most circular references just fine. [...] Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It's a borrowed feature that does not play well with old fundamental decisions inherited from the original design. Garbage collection is not a magical solution for every problem, like many tried to argue about. Let's illustrate with another example.
</blockquote>
<p>
His example uses the <a href="http://reactphp.org/">React</a> PHP library (a non-blocking I/O platform) to handle a lot of incoming data to a port and report back some memory usage and limit settings. He explains a bit about what's happening and shares the results of the test, including the end result - a fatal error when the memory limit was hit. He still comes to the same conclusion, ultimately...PHP is just not the language to use for long-running processes that do any large amount of work. 
</p>
Link: http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued]]></description>
      <pubDate>Fri, 26 Apr 2013 09:15:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: MongoDB Cursors with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17990</guid>
      <link>http://www.phpdeveloper.org/news/17990</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post to his site today about <a href="http://derickrethans.nl/cursors-in-mongodb.html">MongoDB cursors</a> in PHP when using the <a href="http://php.net/mongodb">PHP driver</a> and how it handles pulling data from the server.
</p>
<blockquote>
Recently I was asked to improve the <a href="http://docs.php.net/manual/en/mongocursor.batchsize.php">MongoCursor::batchSize</a> documentation. This began an indepth investigation in how the PHP <a href="http://php.net/mongodb">driver</a> for <a href="http://mongodb.org/">MongoDB</a> handles pulling data that's been queried from the MongoDB server. Here are my findings.
</blockquote>
<p>
He talks about the cursor that's created when a "find" call is made and how you can add on additional options (via other methods on the cursor) to its execution. He also covers how you can set your own batch size, using limit to only fetch a certain number of results and combining the two to make for more memory efficient, yet complete, returned data sets.
</p>]]></description>
      <pubDate>Tue, 22 May 2012 12:23:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Slawek Lukasiewicz's Blog: PHP application diagnostics - Memtrack]]></title>
      <guid>http://www.phpdeveloper.org/news/17102</guid>
      <link>http://www.phpdeveloper.org/news/17102</link>
      <description><![CDATA[<p>
<i>Slawek Lukasiewicz</i> has <a href="http://www.leftjoin.net/2011/11/php-application-diagnostics-memtrack/">posted about a handy tool</a> that can be used to track memory consumption and performance in your PHP application - <a href="http://php.net/manual/en/book.memtrack.php">memtrack</a>.
</p>
<blockquote>
Application profiling can help us determine bottlenecks and possible problems during development. But sometimes we also need to diagnose problems in production environment. Frequent performance problems are connected with functions and methods using too much memory.
</blockquote>
<p>
The tool allows you to set up thresholds for memory consumption and, if the scripts exceeds it, add warnings to your log files. He includes the simple instructions to install it (via <a href="http://pecl.php.net">PECL</a>) and enable it in your php.ini. Some sample code to create a memory overvload is included to test it out. <a href="http://www.php.net/manual/en/memtrack.ini.php">Configuration options</a> let you set the limits and define functions to ignore if you know for sure there's trouble spots.
</p>]]></description>
      <pubDate>Tue, 08 Nov 2011 12:08:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Martin Psinas' Blog: Switching to PDO]]></title>
      <guid>http://www.phpdeveloper.org/news/16674</guid>
      <link>http://www.phpdeveloper.org/news/16674</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Martin Psinas</i> talks about some of his pains experienced with <a href="http://psinas.com/index.php?blogid=8">upgrading his code to use PDO</a> instead of the mysql extension for database interaction.
</p>
<blockquote>
I read not too long ago that the mysql library in PHP is <a href="http://news.php.net/php.internals/53799">being deprecated</a> as of v6.0 in favor of mysqli or PDO, so of course I had to update all of my database code keep on top of things. I spent about 5 or 6 hours over the course of 2 days familiarizing myself with the new syntax and updating my code offline. Without any testing, I decided I could go ahead and push the code "live" because I'm just that over-confident sometimes, although I did make a backup in case anything went wrong (or so I thought).
</blockquote>
<p>
Two problems jumped out immediately - a SQL error caused by <a href="https://bugs.php.net/bug.php?id=40740">this bug</a> and the other being a problem with preparing his statement inside of a session handling method.
</p>]]></description>
      <pubDate>Thu, 04 Aug 2011 10:17:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Doctrine 1.2 MSSQL Alternative LIMIT/Paging]]></title>
      <guid>http://www.phpdeveloper.org/news/15148</guid>
      <link>http://www.phpdeveloper.org/news/15148</link>
      <description><![CDATA[<p>
<i>Daniel Cousineau</i> has <a href="http://www.toosweettobesour.com/2010/09/16/doctrine-1-2-mssql-alternative-limitpaging">a new post</a> to his blog today looking at an alternative that can be used for pagination in your MSSQL queries than the trick with TOP and reversing the ORDER BY in <a href="http://www.doctrine-project.org">Doctrine</a>.
</p>
<blockquote>
As ugly as this technique is, it works. The problem is it requires an extreme amount of intelligence or an extreme amount of simplicity in the query in order for an automated system like Doctrine to be usable. The biggest caveat with this technique is good goddamned luck paging your query if it doesn't have an ORDER BY. And sometimes queries that are complex enough break the modified Zend_Db code. There exists an <a href="http://varjabedian.net/archive/2008/04/09/paging-made-easy-in-ms-sql-server-2005.aspx">easier MSSQL paging technique</a>. Using features first available in SQL Server 2005, with only 1 subquery you can mimic MySQL's LIMIT clause with ease.
</blockquote>
<p>
He includes the query that will make it happen (the SQL for it) and then the implementation as an adapter you can use to get it to cooperate in your Doctrine queries. 
</p>]]></description>
      <pubDate>Fri, 17 Sep 2010 11:34:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Utilizing the LIMIT Clause with the Active Record Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/12245</guid>
      <link>http://www.phpdeveloper.org/news/12245</link>
      <description><![CDATA[<p>
DevShed continues their series on the Active Record pattern in PHP with <a href="http://www.devshed.com/c/a/PHP/Utilizing-the-LIMIT-Clause-with-the-Active-Record-Pattern/">this new article</a> implementing the LIMIT statement on your abstraction class.
</p>
<blockquote>
In its current version, it'll be able to accomplish only a few basic database operations tasks. Therefore, this fifth article of the series will be focused on enabling the class to fetch database rows by using the LIMIT clause.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Utilizing-the-LIMIT-Clause-with-the-Active-Record-Pattern/2/">add the LIMIT clause</a> as a part of its own function and its own SQL statement. You define the number of rows to fetch, the table to fetch it from and the offset to start from. The SQL is passed off to their fetchRow statement and the results are returned in an array.
</p>]]></description>
      <pubDate>Tue, 31 Mar 2009 12:58:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Havard Eide's Blog: Iterators]]></title>
      <guid>http://www.phpdeveloper.org/news/10776</guid>
      <link>http://www.phpdeveloper.org/news/10776</link>
      <description><![CDATA[<p>
<i>Havard Eide</i> looks at another aspect of the Standard PHP Library in a <a href="http://eide.org/2008/08/05/iterators/">new blog post</a> today - iterators.
</p>
<blockquote>
[It's] a set of classes in the SPL that implements various iterating patterns: ArrayIterator, AppendIterator, FilterIterator, LimitIterator and NoRewindIterator. Hopefully you'll get a idea of what these are capable of and that you can get some new ideas for your day-to-day tasks.
</blockquote>
<p>
He breaks it down into example of each, explaining what they can be used for, how they work and a code example of each in action (with output). You can find more information in iterators and their functions in the <a href="http://us.php.net/spl">SPL section</a> of the manual.
</p>]]></description>
      <pubDate>Wed, 06 Aug 2008 12:52:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPFreaks.com: Basic Pagination]]></title>
      <guid>http://www.phpdeveloper.org/news/10438</guid>
      <link>http://www.phpdeveloper.org/news/10438</link>
      <description><![CDATA[<p>
A <a href="http://www.phpfreaks.com/tutorial/basic-pagination">new tutorial</a> has been posted on the PHPFreaks.com site today dealing with paginating your data (in their example, info from a database).
</p>
<blockquote>
It makes way more sense to break up your list into page-sized chunks, and only query your database one chunk at a time. This drastically reduces server processing time and page load time, as well as gives your user smaller pieces of info to digest, so he doesn't choke on whatever crap you're trying to feed him. The act of doing this is called pagination.
</blockquote>
<p>
They include the <a href="http://www.phpfreaks.com/tutorial/basic-pagination/page3">full script</a> for those that want to jump right in and the detailed info in the rest of the tutorial for those that need a little more insight. The script gets a count of the results first then uses the LIMIT format for MySQL to restrict the number of rows returned each time and where to start those returned rows from.
</p>]]></description>
      <pubDate>Thu, 19 Jun 2008 08:47:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Markus Wolff's Blog: ActiveRecord enhancements]]></title>
      <guid>http://www.phpdeveloper.org/news/6238</guid>
      <link>http://www.phpdeveloper.org/news/6238</link>
      <description><![CDATA[<p>
<i>Markus Wolff</i> <a href="http://blog.wolff-hamburg.de/archives/10-ActiveRecord-enhancements.html">finally got the time</a> to work on a project he's developed but hasn't had the time to enhance - <a href="https://ssl.limbourg.com/svn/CWAC/trunk/library/CWAC/ActiveRecord.php">CWAC_ActiveRecord</a>.
</p>
<blockquote>
After two weeks I finally managed to find a bit of time to continue working on CWAC_ActiveRecord. Requested by my friend Arnaud was the setConnection() method, that allows to reuse existing PDO objects with CWAC_ActiveRecord. Before this, you could only pass a DSN with the config array and a new connection would always be created.
</blockquote>
<p>
He <a href="http://blog.wolff-hamburg.de/archives/10-ActiveRecord-enhancements.html">also added</a> limit() and orderby() methods to help narrow down your queries.
</p>]]></description>
      <pubDate>Mon, 11 Sep 2006 08:16:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tobias Schlitt's Blog: Trakbacks on PEARWeb and PEAR Services_Trackback]]></title>
      <guid>http://www.phpdeveloper.org/news/4847</guid>
      <link>http://www.phpdeveloper.org/news/4847</link>
      <description><![CDATA[<i>Tobias Schlitt</i> has <a href="http://www.schlitt.info/applications/blog/index.php?/archives/418-Trakbacks-on-PEARWeb-and-PEARServices_Trackback.html">a new post</a> today concerning the improvements that's been made to the PEAR::Services_Trackback package.
<p>
<quote>
<i>
I finally found some time and improved the trackback handling on <a href="http://pear.php.net">PEARWeb</a>: 
<ul>
<li>HTML entities in trackbacks are now decoded before using the bad-word-filter (and the list has been updated)
<li>Only 3 trackbacks per 30 minutes will be accepted from a host from now.
<li>If both of these criteria do not match, it uses DNSBL and SURBL mechanisms to check trackbacks additionally.
</ul>
</i>
</quote>
<p>
He <a href="http://www.schlitt.info/applications/blog/index.php?/archives/418-Trakbacks-on-PEARWeb-and-PEARServices_Trackback.html">comments on</a> how it will work now with these improvements and the popularity that the package is garnering...]]></description>
      <pubDate>Wed, 15 Feb 2006 07:10:38 -0600</pubDate>
    </item>
  </channel>
</rss>
