<?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, 12 Feb 2012 20:03:51 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Checking the performance of PHP exceptions]]></title>
      <guid>http://www.phpdeveloper.org/news/17403</guid>
      <link>http://www.phpdeveloper.org/news/17403</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog today looking at <a href="http://gonzalo123.wordpress.com/2012/01/16/checking-the-performance-of-php-exceptions/">the performance of PHP exceptions</a> and how it could effect your application's overall speed.
</p>
<blockquote>
Sometimes we use exceptions to manage the flow of our scripts. I imagine that the use of exceptions must have a performance lack. Because of that I will perform a small benchmark to test the performance of one simple script throwing exceptions and without them.
</blockquote>
<p>
His (little) benchmarking scripts are included - both looping 100000 times, one throwing an exception and the other not. The results were pretty obvious - the memory usage was about the same but the speed was about ten times faster without the exceptions (in PHP 5.3). In PHP 5.4, however, the numbers were closer as far as time to run. Obviously, unless you make super heavy use of exceptions, you're not even going to come close to something like this (micro-optimization anyone?).
</p>]]></description>
      <pubDate>Tue, 17 Jan 2012 08:02:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Bence Eros' Blog: Request execution in Kohana 3.1]]></title>
      <guid>http://www.phpdeveloper.org/news/15667</guid>
      <link>http://www.phpdeveloper.org/news/15667</link>
      <description><![CDATA[<p>
In a new post to his blog, <i>Bence Eros</i> takes a look at <a href="http://erosbence.blogspot.com/2011/01/request-execution-in-kohana-31.html">the request execution path</a> that your Kohana-based application goes through each time a page request is made.
</p>
<blockquote>
Yesterday Kohana 3.1 RC1 has been <a href="http://forum.kohanaframework.org/discussion/7709/kohana-3.1-rc1/">announced</a> and <a href="https://github.com/kohana/kohana/tree/3.1-RC1">tagged</a>. I think now it's time to get familiar it. In this post I'm going to examine the refactored request execution workflow. Let's start with the bootstrap mechanism.
</blockquote>
<p>
He notes that most of the changes don't happen at the boostrap level. They're more behind the scenes than that, with changes in how it works within the HMVC design pattern. He talks about the changes in the Request objetct's constructor, factory and client methods. He also includes a full flow of a request for a sample welcome controller, describing the steps it falls into and a list of classes that the Request object may have used. 
</p>]]></description>
      <pubDate>Mon, 03 Jan 2011 08:40:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Adam Pullen's Blog: Execution Filters in Symfony]]></title>
      <guid>http://www.phpdeveloper.org/news/15176</guid>
      <link>http://www.phpdeveloper.org/news/15176</link>
      <description><![CDATA[<p>
<i>Adam Pullen</i> has posted a three-part series of articles looking at execution filters in <a href="http://symfony-project.org">Symfony</a> to modify/handle the request differently than just the normal GET or POST would pass through.
</p>
<blockquote>
Symfony is a powerful PHP Framework. One of the features that I have really taken advantage in my last project is request filtering or execution filtering. Request filters allow you to inspect the request before and after the main logic is executed. Why would one want to do this? There are many reasons to implement request filtering.
</blockquote>
<p>Here's his three articles:</p>
<ul>
<li><a href="http://www.finalconcept.com.au/article/view/symfony-execution-filters">Execution Filters</a>
<li><a href="http://www.finalconcept.com.au/article/view/symfony-execution-filters-add-objects-to-global-environment">Execution Filters:Add objects to global environment</a>
<li><a href="http://www.finalconcept.com.au/article/view/symfony-execution-filters-controlling-output">Execution Filters: Controlling output</a>
</ul>
<p>
You can find out more on their practical use in <a href="http://www.symfony-project.org/askeet/1_0/en/18">this section</a> of the Symfony site.
</p>]]></description>
      <pubDate>Thu, 23 Sep 2010 11:32:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Parallel cURL execution in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14907</guid>
      <link>http://www.phpdeveloper.org/news/14907</link>
      <description><![CDATA[<p>
New on his blog today <i>Sameer Borate</i> has a post looking at his method for making <a href="http://www.codediesel.com/php/parallel-curl-execution/">parallel connections with curl</a> based on <a href="http://github.com/petewarden/ParallelCurl">this library</a> from <i>Pete Wardens</i>.
</p>
<blockquote>
Most people use the 'easy' mode - in this mode when we issue multiple requests, the second request will not start until the first one is complete. This is known as synchronous execution, and this is the one we normally use. [...] In [multi] mode all requests can be handled in parallel or asynchronously. And it can be quite handy and time saving on many occasions. 
</blockquote>
<p>
He gives some code examples of how to use <a href="http://github.com/petewarden/ParallelCurl">the library</a> to simplify the curl connections and requests and pass the result off to a callback when it's done. His more practical example shows how to search for a set of terms on Google and return the results for output.
</p>]]></description>
      <pubDate>Thu, 05 Aug 2010 09:56:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Giorgio Sironi's Blog: Java versus PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14364</guid>
      <link>http://www.phpdeveloper.org/news/14364</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Giorgio Sironi</i> has a (more balanced) comparison of <a href="http://giorgiosironi.blogspot.com/2010/04/java-versus-php.html?">Java versus PHP</a> that them on topics like how they handle typing and their execution models.
</p>
<blockquote>
If you exclude C and its child C++, the <a href="http://langpop.com/">most popular programming languages</a> in the world are Java and PHP, which power most of the dynamic web. I have working experience with PHP and for academical purposes I am deepening my knowledge of Java, thus I'd like to point out similarities and key differences between these two languages. Every language has its pros and cons, so there's no absolute winner here.
</blockquote>
<p>
He briefly covers their history, java's static versus PHP's dynamic typing, how they both handle objects, their execution plans and how easy they are to deploy when it comes to general applications.
</p>]]></description>
      <pubDate>Fri, 16 Apr 2010 10:55:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Mitigate the Security Risks of PHP System Command Execution]]></title>
      <guid>http://www.phpdeveloper.org/news/13934</guid>
      <link>http://www.phpdeveloper.org/news/13934</link>
      <description><![CDATA[<p>
PHPBuilder.com has a new article from <i>Jason Gilmore</i> on <a href="http://www.phpbuilder.com/columns/Jason_Gilmore012810.php3">security in command-line applications</a> posted today and what you can do to help protect your scripts from unwanted system command access.
</p>
<blockquote>
In this tutorial, I'll show you how to securely execute a variety of system-based commands via a PHP script, demonstrating how to build web applications that can tightly integrate with both the operating system and third-party software.
</blockquote>
<p>
He mentions the proper filtering of input strings (user input), how it can protect your and your application as well as a few examples of using the PHP execution functions (like <a href="http://php.net/exec">exec</a> or <a href="http://php.net/passthru">passthru</a>) and how to apply the shell escaping commands (like <a href="http://www.php.net/escapeshellarg">escapeshellarg</a>) as a first layer of security.
</p>]]></description>
      <pubDate>Fri, 29 Jan 2010 09:47:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ParticleTree Blog: PHP Quick Profiler]]></title>
      <guid>http://www.phpdeveloper.org/news/12397</guid>
      <link>http://www.phpdeveloper.org/news/12397</link>
      <description><![CDATA[<p>
Debugging resources being used by your script has always been a pain, and many developers have come up with their own libraries to handle the process. <i>Ryan Campbell</i> has his own entry in the category - the <a href="http://particletree.com/features/php-quick-profiler/">PHP Quick Profiler</a>.
</p>
<blockquote>
<p>
In our company, <a href="http://en.wikipedia.org/wiki/Code_review">code reviews</a> play an integral part in the development process for making quality software. We opt for a <a href="http://www.codinghorror.com/blog/archives/001229.html">mentor style approach</a> with Wufoo, where a developer works on a segment for a period of time and then passes it up to a more experienced developer for review. 
</p><p>
[...] To reduce this repetition of checking the same requirements over and over], we invested some time creating something we've called the PHP Quick Profiler-we call it PQP for short. It's a small tool (think Firebug for PHP) to provide profiling and debugging related information to developers without needing them to add a lot of programmatic overhead to their code.
</p>
</blockquote>
<p>
The <a href="http://particletree.com/features/php-quick-profiler/">post</a> gives several screenshots of the tool in action and code to get you up and running quickly. The Profiler can keep track of memory usage, "runaway" includes, execution time and database activity. There's also an <a href="http://particletree.com/examples/pqp/">online demo</a> so you can try it out yourself. 
</p>
<p>
<a href="http://particletree.com/mint/pepper/orderedlist/downloads/download.php?file=http%3A//particletree.com/files/pqp/pqp.zip">Here's the link</a> to the latest version's download.
</p>]]></description>
      <pubDate>Fri, 24 Apr 2009 07:57:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: in_array is quite slow]]></title>
      <guid>http://www.phpdeveloper.org/news/10357</guid>
      <link>http://www.phpdeveloper.org/news/10357</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> had <a href="http://brian.moonspot.net/2008/06/05/in_array-is-quite-slow/">a problem</a> - one of his cron jobs was lasting for much longer (hours!) than it should have been. He tweaked, tested and debugged the script and finally came down to a call to <a href="http://www.php.net/in_array">in_array</a>, something he comments on as being "quite slow".
</p>
<blockquote>
See, this job is importing data from a huge XML file into MySQL.  After it is done, we want to compare the data we just added/updated to the data in the table so we can deactivate any data we did not update. [...] We then compared the two arrays by looping one array and using in_array() to check if the value was in the second array. [...] So, that was running for hours with about 400k items.  Our data did not contain the value as the key, but it could as the value was unique.  
</blockquote>
<p>
He method, replacing the in_array call that had to do a full array scan for each time through the loop with an isset/unset combo on the unique key, changed the execution time down from about 4 hours to 0.8 seconds.
</p>]]></description>
      <pubDate>Fri, 06 Jun 2008 09:36:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nessa's Blog: Common PHP Errors]]></title>
      <guid>http://www.phpdeveloper.org/news/9208</guid>
      <link>http://www.phpdeveloper.org/news/9208</link>
      <description><![CDATA[<p>
<i>Nessa</i> has <a href="http://www.v-nessa.net/2007/12/07/common-php-errors">set up a post</a> in an effort to help budding PHP developers out there with some of the most common problems they might come across in their work and how to handle them a bit more gracefully with error handling:
</p>
<blockquote>
I'm going back to the basics here, you know, when you wrote your first PHP script and saw an ugly-ass error message pop up on your screen? Error messages are the best tool a programmer has.
</blockquote>
<p>
She talks about how to set up the error reporting first, making sure that you're getting things up and useful. From there she describes some of the common errors that you might see including:
</p>
<ul>
<li>Parse errors
<li>MySQL Result source errors
<li>Stream errors
<li>Max Execution Time errors
</ul>
<p>
Check out <a href="http://www.v-nessa.net/2007/12/07/common-php-errors">the rest of the post</a> for more types.
</p>]]></description>
      <pubDate>Mon, 10 Dec 2007 12:05:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Discovery Blog: Dangers of Remote Execution]]></title>
      <guid>http://www.phpdeveloper.org/news/9092</guid>
      <link>http://www.phpdeveloper.org/news/9092</link>
      <description><![CDATA[<p>
On the PHP Discovery blog, there's a <a href="http://phpdiscovery.com/dangers-of-remote-execution/">new post</a> reminding PHP developers of some of the more dangerous ways that remote execution could effect your site and some of the common entry points it can have.
</p>
<blockquote>
PHP has numerous ways to execute raw PHP code unless you the programmer stops it.  Best way in preventing these methods is making sure you check the input of what your users are inputting, and making sure you escape all malicious actions that a hacker,cracker, kiddy scripter might want to do to your website. 
</blockquote>
<p>
He summarizes four of the things from the <a href="http://apress.com/book/view/1590595084">Pro PHP Security</a> book from Apress (by <i>Chris Snyder</i> and <i>Michael Southwell</i>) that can leave holes in you application for would-be explots - preg_replace, shell_exec/exec, eval (which we all know is only one letter from "evil" anyway) and require/include.
</p>]]></description>
      <pubDate>Wed, 21 Nov 2007 13:48:00 -0600</pubDate>
    </item>
  </channel>
</rss>

