<?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:41:48 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: PHP Components: PHP Components: Shipping Unit Tests With Your Component]]></title>
      <guid>http://www.phpdeveloper.org/news/16716</guid>
      <link>http://www.phpdeveloper.org/news/16716</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i> has his latest post in his "PHP Components" series on his blog today - a recommendation to <a href="http://blog.stuartherbert.com/php/2011/08/15/php-components-shipping-unit-tests-with-your-component/">include unit tests</a> along with the release of you component.
</p>
<blockquote>
I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible package. One of the most important file roles allows you to ship your tests with your package - and it's vital that this is something that you get in the habit of doing routinely.
</blockquote>
<p>
He recommends "testing your code and shipping your tests" along with the component(s) you're releasing. Not only does it help you create a better quality end result but also makes it simpler for other developers to make changes and know they're not breaking things. He describes unit tests for those not familiar and includes a specific example of the <a href="http://github.com/Gradwell/CommandLineLibrary">CommandLineLibrary</a> and its related tests. 
</p>]]></description>
      <pubDate>Mon, 15 Aug 2011 09:57:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Hardening PHP: How to securely include remote code (part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/16453</guid>
      <link>http://www.phpdeveloper.org/news/16453</link>
      <description><![CDATA[<p>
On the PHP on Windows blog from <a href="http://dzone.com">DZone.com</a> <i>Krzysztof Kotowicz</i> has a new post - part one in a series on securing your PHP application - a look at <a href="http://css.dzone.com/news/hardening-php-how-securely">securely including remote code</a> from a source outside of your application.
</p>
<blockquote>
First post of the series discussing various methods of including remote PHP code in your application - from security standpoint. In this post we discuss the history of remote code execution vulnerabilities in PHP apps and ways to prevent them. We finish off by presenting an unsecure method of including a remote code and describe what is the problem with that method.
</blockquote>
<p>
He looks at the insecurity of a standard include/require, the <a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include">allow_url_include</a> php.ini setting and the issues with using hardcoded locations (like incorrect DNS records pointing to the wrong host).
</p>]]></description>
      <pubDate>Fri, 10 Jun 2011 10:28:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Include-Based vs Class-Based Architecture]]></title>
      <guid>http://www.phpdeveloper.org/news/16037</guid>
      <link>http://www.phpdeveloper.org/news/16037</link>
      <description><![CDATA[<p>
<i>Paul Jones</i> has a new post to his blog looking at two approaches to building applications in PHP - either using an <a href="http://paul-m-jones.com/archives/1763">include-based of class-based architecture</a>, briefly looking at the advantages and disadvantages of each.
</p>
<blockquote>
This is a topic I describe at length in my <a href="http://paul-m-jones.com/public/organizing-php-projects.pdf">Organizing</a> [Your PHP Projects] talk, but I would like to give the idea a home on my blog for easy reference.
</blockquote>
<p>
He talks about the typical structure of a PHP application - at least where most start out - being the "include" method. He talks about the progression it usually makes into functions and classes and then, eventually, a jump in concept to the "class" method similar to what several popular frameworks have gone with.
</p>
<blockquote>
The difference is that no program logic is executed at loading time with a class file. Loading the class file makes it available for use, but the programmer has to instantiate it and then call methods on it for anything else to happen.
</blockquote>]]></description>
      <pubDate>Mon, 14 Mar 2011 09:14:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SeeIT.com: The include() include_once() performance debate]]></title>
      <guid>http://www.phpdeveloper.org/news/14641</guid>
      <link>http://www.phpdeveloper.org/news/14641</link>
      <description><![CDATA[<p>
From the SeeIT.org blog today there's a new post rehashing an old topic that pops up from time to time in the PHP community - the <a href="http://blog.seeit.org/2010/06/php-the-include-include_once-performance-debate/">include vs include_once performance debate</a>.
</p>
<blockquote>
The conventional wisdom always said that PHP's include()/require() was quicker than include_once()/require_once(), but recently I came across <a href="http://arin.me/blog/php-require-vs-include-vs-require_once-vs-include_once-performance-test">an interesting post by Arin Sarkissian which suggests otherwise</a>.  [...] So in keeping with the spirit of quick and dirty experimentation I hacked up some code and ran some tests on include()/require() against include_once()/require_once() and on the relative/absolute path issue. The results are pretty surprising and I love to hear some views.
</blockquote>
<p>
He includes the testing methodology consisted of creating 10,000 files with a simple variable assignment in them and a loop to run through all of them to record the time (as reported by <a href="http://php.net/microtime">microtime</a>) switching out the different times of inclusion each time - include, include_once, require, require_once. You'll have to <a href="http://blog.seeit.org/2010/06/php-the-include-include_once-performance-debate/">visit the post</a> yourself to see the results of the tests. There's charts and tables showing the differences in results based on things like using APC and PHP4 versus PHP5.
</p>]]></description>
      <pubDate>Fri, 11 Jun 2010 12:42:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Including Files Recursively with Loader Applications in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12666</guid>
      <link>http://www.phpdeveloper.org/news/12666</link>
      <description><![CDATA[<p>
DevShed continues their "loaders in applications" series with <a href="http://www.devshed.com/c/a/PHP/Including-Files-Recursively-with-Loader-Applications-in-PHP">this fourth part</a>, a look at including files recursively.
</p>
<blockquote>
This series uses a variety of code samples to teach you how to create modular programs. These programs are capable of recursively including files required by a given application, without having to explicitly call any "include()/include_once()" or "require()/require_once()" PHP function.
</blockquote>
<p>
In <a href="http://www.devshed.com/c/a/PHP/Including-Files-Recursively-with-Loader-Applications-in-PHP/2/">their example</a> they show how to use their loader class (built up from previous parts of the series) and modify it slightly to allow the script to set the file path, set the files to include and pull them in.
</p>]]></description>
      <pubDate>Thu, 11 Jun 2009 12:43:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building Loader Apps in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12584</guid>
      <link>http://www.phpdeveloper.org/news/12584</link>
      <description><![CDATA[<p>
In <a href="http://www.devshed.com/c/a/PHP/Building-Loader-Apps-in-PHP">this first part of a new series</a> in application development, DevShed looks at building a loader for various resources inside your app.
</p>
<blockquote>
Loading sources on the fly is one of the most common tasks that PHP programmers have to tackle during the development of web applications. This typical situation must be faced independently of the scale of the programs being created. This means a loader mechanism must be developed.
</blockquote>
<p>
Their <a href="http://www.devshed.com/c/a/PHP/Building-Loader-Apps-in-PHP/2/">basic loader class</a> uses a call to a load() method to do two things - check to ensure that a file exists and, if it does, include it (technically a require_once). They also put a bit of exception handling around it to help catch any errors thrown on the include.
</p>]]></description>
      <pubDate>Thu, 28 May 2009 09:37:51 -0500</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[Alex Netkachov's Blog: File stream wrapper is overwritable in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12255</guid>
      <link>http://www.phpdeveloper.org/news/12255</link>
      <description><![CDATA[<p>
<i>Alex Netkachov</i> has <a href="http://www.alexatnet.com/node/203">found out something interesting</a> - the default "file" stream wrapper can be overridden.
</p>
<blockquote>
I find today that the default "file" stream wrapper in PHP is overwritable. You only need to call stream_wrapper_unregister and then stream_wrapper_register with your wrapper.
</blockquote>
<p>
He gives an example of a situation where you might need to "catch" certain files as they're requested and replace them with another before they make it back to the source. His example code shows how to create the stream (using <a href="http://php.net/stream_open">stream_open</a>) and set methods to read, write, seek and work directly with the stream resource. It takes the file requested and replaces the "5" in the name - "test.php" is included instead of "test.php5".
</p>]]></description>
      <pubDate>Wed, 01 Apr 2009 11:14:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: Improved PHPUnit Filters]]></title>
      <guid>http://www.phpdeveloper.org/news/11867</guid>
      <link>http://www.phpdeveloper.org/news/11867</link>
      <description><![CDATA[<p>
In <a href="http://www.ds-o.com/archives/78-Improved-PHPUnit-Filters.html">a recent post</a> to his blog <i>Mike Lively</i> looks at some improvements that he's worked up for the popular PHP unit testing software - <a href="http://phpunit.de">PHPUnit</a> - in regards to its filters.
</p>
<blockquote>
I have finally gotten some time to do some long awaited work on PHPUnit. The first on my agenda was a small improvement to filtering. This was related to <a href="http://www.ds-o.com/exit.php?url_id=237&entry_id=78">ticket #526</a>. Essentially I added the ability to do both white list and black list filtering. 
</blockquote>
<p>
Besides the Include methods you can add to the data set's filtering, you can also add in Exclude filters to remove the data you don't want in the set. They can also be combined to customize your data set to your heart's content.
</p>]]></description>
      <pubDate>Tue, 03 Feb 2009 09:32:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[TotalPHP: Using a global configuration file]]></title>
      <guid>http://www.phpdeveloper.org/news/11514</guid>
      <link>http://www.phpdeveloper.org/news/11514</link>
      <description><![CDATA[<p>
The TotalPHP site is recommending something that can make your development (and maintenance) life much easier in the long run - <a href="http://www.total-php.com/article/16/using-a-global-configuration-file/">using a global configuration file</a> through out your app.
</p>
<blockquote>
t's one of the basics of PHP and if you read any kind of tutorial or book on the subject it's one of the first things they cover, yet I still see people no using a global 'configuration' or 'include' file. It's one of the easiest things to do and will make your life so much easier! This 'configuration' file will include anything that needs to be run on every page of the website. 
</blockquote>
<p>
They suggest that using this configuration file everywhere (including it over the entire site) can make things easier in the long run. The idea is not without problems, though. It only works until you need something custom for a certain area or page - then you have to hack it to evaluate conditions. For most simple uses, though, its a good way to share information (like database connection details) through out the application.
</p>]]></description>
      <pubDate>Fri, 05 Dec 2008 10:25:59 -0600</pubDate>
    </item>
  </channel>
</rss>

