<?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>Wed, 19 Jun 2013 14:36:06 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPClasses.org: 10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible]]></title>
      <guid>http://www.phpdeveloper.org/news/19650</guid>
      <link>http://www.phpdeveloper.org/news/19650</link>
      <description><![CDATA[<p>
On the PHPClasses.org blog today <i>Manuel Lemos</i> has shared some advice on <a href="http://www.phpclasses.org/blog/package/1351/post/1-10-Steps-to-properly-do-PHP-Bug-Tracking-and-Fixing-as-Fast-as-possible.html">tracking and fixing bugs</a> and some strategies to help prevent them in the future.
</p>
<blockquote>
No matter how hard you try to test your PHP applications before putting them in production, you will always ship code to your server that has bugs. Some of those bugs will be very serious and need to be fixed before they cause greater damages to your application data that may be too hard to recover. Read this article to learn about a several good practices that you can apply to track bugs in production code, so you can fix them before it is too late.
</blockquote>
<p>Suggestions included in his list are things like:</p>
<ul>
<li>Test as Much as Possible Before in your Development Environment
<li>Separate your Code from Environment Configuration files
<li>Track PHP Errors with Assertion Condition Tests
<li>Send PHP Errors to an Error Log File
<li>Monitor the PHP Error Log File to Quickly Fix Serious Bugs
<li>Fix Your Bugs but Never Edit Code on the Production Server
</ul>
<p>
He also includes a brief look at some things to think about when considering "defensive coding practices" and links to other articles with more information.
</p>
Link: http://www.phpclasses.org/blog/package/1351/post/1-10-Steps-to-properly-do-PHP-Bug-Tracking-and-Fixing-as-Fast-as-possible.html]]></description>
      <pubDate>Thu, 30 May 2013 11:49:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dzone.com: Diving into Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19432</guid>
      <link>http://www.phpdeveloper.org/news/19432</link>
      <description><![CDATA[<p>
<i>Giorgio Sironi</i> has a new post to DZone.com today about some of his <a href="http://css.dzone.com/articles/diving-behat">experiences with Behat</a>, a behavior-driven development testing tool written in PHP. It uses the <a href="https://github.com/cucumber/cucumber/wiki/Gherkin">Gherkin</a> language syntax to define its tests.
</p>
<blockquote>
I had the occasion to try out and adopt Behat for a particular need in our projects at Onebip. Here is my recount of the experience from a PHPUnit contributor and invested person.
</blockquote>
<p>
He starts off with a list of situations where he doesn't think that Behat is a good fit for testing including testing of a single object and acceptance tests where comparing the response from more than one test is needed. He suggests that it's more useful for verifying high level business rules than anything. He talks some about the shift they made to using Behat and some of the benefits they found in its use. He finishes up the post by looking at the technical side and includes a warning about letting the size of the FeatureContext file get too large.
</p>
Link: http://css.dzone.com/articles/diving-behat]]></description>
      <pubDate>Tue, 09 Apr 2013 09:50:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web & PHP Magazine: Issue #8 - The Power of Design]]></title>
      <guid>http://www.phpdeveloper.org/news/18755</guid>
      <link>http://www.phpdeveloper.org/news/18755</link>
      <description><![CDATA[<p>
The latest issue of the Web & PHP Magazine has been released - <a href="http://webandphp.com/issue-8">Issue 8 - The Power of Design</a>. Articles in this latest issue include:
</p>
<ul>
<li><i>Todd Lombardo</i> on user context
<li><i>Stefan Priebsch</i> on data and persistence
<li><i>Patrick Allaert</i> about data structures
<lI><i>June Henriksen</i> on the human side of programming
</ul>
<p>
You can find out more about this issue (and go download your free copy) <a href="http://webandphp.com/issue-8">on the Web & PHP site</a>. There's also seven previous issues, all free for download (PDF format)!
</p>]]></description>
      <pubDate>Thu, 15 Nov 2012 13:55:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Nikita Popov's Blog: The true power of regular expressions]]></title>
      <guid>http://www.phpdeveloper.org/news/18098</guid>
      <link>http://www.phpdeveloper.org/news/18098</link>
      <description><![CDATA[<p>
<i>Nikita Popov</i> has a new (language agnostic) post to his blog today about one of the most powerful things you can use in your development - something that a lot of developers don't understand the true power of - <a href="http://nikic.github.com/2012/06/15/The-true-power-of-regular-expressions.html">regular expressions</a>.
</p>
<blockquote>
As someone who frequents the PHP tag on StackOverflow I pretty often see questions about how to parse some particular aspect of HTML using regular expressions. A common reply to such a question is: "You cannot parse HTML with regular expressions, because HTML isn't regular. Use an XML parser instead." This statement - in the context of the question - is somewhere between very misleading and outright wrong. What I'll try to demonstrate in this article is how powerful modern regular expressions really are.
</blockquote>
<p>
He starts with the basics, defining the "regular" part of "regular expression" (hint: it has to do with predictability) and the grammar of the expressions. He talks about the <a href="http://en.wikipedia.org/wiki/Chomsky_hierarchy">Chomsky hierarchy </a> and how it relates to the "regular" as well as a more complex mapping of expression to language rules. He talks about matching context-free and context-sensitive languages and unrestricted grammars as well.
</p>]]></description>
      <pubDate>Fri, 15 Jun 2012 08:42:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Enrise.com: REST Style Context Switching - Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/15736</guid>
      <link>http://www.phpdeveloper.org/news/15736</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has written up a new post for the Enrise blog today about <a href="http://www.enrise.com/2011/01/rest-style-context-switching-part-2/">using REST-style context switching</a> in Zend Framework applications with the help of a handy "RestContextSwitch" helper.
</p>
<blockquote>
In the <a href="http://www.enrise.com/2010/12/rest-style-context-switching/">first part</a> of this blog post we've talked about the theory behind REST services. In this post we put the theory into practice with the help of some code snippets you can implement in your own application.
</blockquote>
<p>
He starts by helping you create a simple REST controller (well, cut-and-pasteable code, really) that can handle multiple output formats/contexts - XML, JSON and HTML. Next up is the helper (Service_Controller_Action_Helper_RestContextSwitch) that's not much different than the normal context switching helper. With that in place he moves on to the plugins - an accept-hander that sets the correct format based on the Accept HTTP header information and a media-format plugin to check "permissions" on the context to see if that type is allowed in that environment.
</p>]]></description>
      <pubDate>Thu, 13 Jan 2011 12:48:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Zend Framework context switching for HTML content]]></title>
      <guid>http://www.phpdeveloper.org/news/14362</guid>
      <link>http://www.phpdeveloper.org/news/14362</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> has a new post to his blog today looking a a method for doing some <a href="http://www.dragonbe.com/2010/04/zend-framework-context-switching-for.html">context switching</a> in his Zend Framework application to use jQuery in his app's static HTML output.
</p>
<blockquote>
I had already build my apps using static HTML output generated by <a href="http://framework.zend.com/">Zend Framework</a>, so how could I add this richness to my apps without refactoring most of my code ? Simple, by using Zend_Controller_Action_Helper_ContextSwitch, <A href="http://framework.zend.com/manual/1.10/en/zendx.jquery.html">ZendX_JQuery</a> and some minor adjustments to my view scripts.
</blockquote>
<p>
He includes some code (that's confirmed to work with ZF 1.10.3) using the contextSwitch method on a helper object that adds in the "json" type for the contexts that can be used for the responses. Then a new template is added for the type (like index.json.phtml for the json output). Make a change or two to your bootstrap file to add in the right jQuery helpers and your view is as simple as calling "$this->jQuery".
</p>]]></description>
      <pubDate>Fri, 16 Apr 2010 08:43:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ant Phillips' Blog: Singletons, BIRT, Theads and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11975</guid>
      <link>http://www.phpdeveloper.org/news/11975</link>
      <description><![CDATA[<p>
In doing some work with <a href="http://www.projectzero.org/php/">Zero</a> (PHP in Java) and the <a href="http://www.eclipse.org/birt">Eclipse Business Intelligence and Reporting Tools</a> project, <i>Ant Phillips</i> <a href="http://antblah.blogspot.com/2009/02/singletons-and-php.html">had some troubles</a> with multithreaded PHP processes and wanting them all to use the same BIRT instance insted of spawning their own.
</p>
<blockquote>
The problem is that BIRT needs to be started once, and only once, in any given process. Once it has been started up, then it is plain sailing to load reports and render them to HTML. The BIRT runtime should be kept around until the process shuts down. 
</blockquote>
<p>
Two problems came up with this approach - if each PHP process makes its own BIRT process any settings/current data will be wiped out and the BIRT instance would go away whenever the PHP script finishes. He found something that solves both of these problems - the <a href="http://www.projectzero.org/zero/sebring/latest/docs/zero.devguide.doc/zero.core/GlobalContext.html">Zero Global Context</a>. Its a "storage area" that can contain just about anything. He used it to store the BIRT runtime until its told to finish and die off.
</p>]]></description>
      <pubDate>Wed, 18 Feb 2009 12:55:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Context Includes]]></title>
      <guid>http://www.phpdeveloper.org/news/11216</guid>
      <link>http://www.phpdeveloper.org/news/11216</link>
      <description><![CDATA[<p>
The NETTUTS blog has another <a href="http://nettuts.com/working-with-cmss/context-includes/">WordPress-related post</a> today that looks at "context includes" - changing the look and feel of the postings based on the content type they're tagged with.
</p>
<blockquote>
The great thing about WordPress is that it doesn't limit how content is displayed, but provides a 'framework' of ways to do so. Even better, it's possible to change the display according to the content. When writing this tutorial it was hard to explain what's going on... But the best way is this: the post will be displayed within the loop according to its content - or contextual differences. Either way, it's including specific files that match up to the category of the post.
</blockquote>
<p>
There's plenty of <a href="http://nettuts.com/working-with-cmss/context-includes/">code to go around</a> introducing you to the parts of the typical WodPress install you'll be working with and some CSS to help you style the resulting changes. You can download the <a href="http://nettuts.s3.amazonaws.com/092_contextIncludes/contextIncludes.zip">source</a> and check out <a href="http://nettuts.s3.amazonaws.com/092_contextIncludes/preview/index.html">a live demo</a> of the end result.
</p>]]></description>
      <pubDate>Wed, 15 Oct 2008 10:23:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Wez Furlong's Blog: HTTP POST from PHP, without cURL]]></title>
      <guid>http://www.phpdeveloper.org/news/6712</guid>
      <link>http://www.phpdeveloper.org/news/6712</link>
      <description><![CDATA[<p>
In an effort to get streams more out in the, er, mainstream, <i>Wez Furlong</i> has <a href="http://netevil.org/node.php?nid=937">posted an example</a> of some code for a common operation many use cURL for - posting to a remote script - but with streams.
</p>
<blockquote>
Every time I search for the code snippet that allows you to do an HTTP POST request, I don't find it in the manual and resort to reading the source. So, here's an example of how to send a POST request with straight up PHP, no cURL.
</blockquote>
<p>
The example uses stream_context_create, fopen, stream_get_contents and an Exception to send off the message from an inputted array to the remote server. Smaller things, like the Content-length header on the request, are automatically handled by the wrapper functionality. You can check out <a href="http://www.php.net/manual/en/wrappers.http.php">this page</a> for more information on the wrapper functionality.
</p>]]></description>
      <pubDate>Wed, 15 Nov 2006 10:09:00 -0600</pubDate>
    </item>
  </channel>
</rss>
