<?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, 18 Jun 2013 15:52:16 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jani Hartikainen: Parsing and evaluating PHP in Haskell: Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19079</guid>
      <link>http://www.phpdeveloper.org/news/19079</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has posted the <a href="http://codeutopia.net/blog/2013/01/23/parsing-and-evaluating-php-in-haskell-part-2/">second article</a> in his series looking at parsing PHP with Haskell (part one is <a href="http://phpdeveloper.org/news/19052">here</a>). In this new article he builds on the parser he built last time and gets to the actual evaluation of the PHP code.
</p>
<blockquote>
Last week I wrote a post about a PHP parser / evaluator I wrote in Haskell. I explained some of the parts on how the parser itself was designed to process PHP code into an abstract source tree. Continuing from where we left off in the <a href="http://codeutopia.net/blog/2013/01/16/parsing-and-evaluating-php-in-haskell-part-1/">previous part</a>, in this post I'll discuss the actual evaluation part.
</blockquote>
<p>
He starts by introducing the structure of the evaluator script, how it's broken up into functionality based on the type of object/data type being handled. He uses a "custom monad transformer stack" to handle the environment for the evaluation as is progresses. He talks about handling statements and expressions, declaring custom functions and the actual execution of the function call. There's also a mention of handling conditionals/looping as well as dealing with PHP's type juggling. 
</p>
<p>
if you're interested in seeing the final result (and maybe trying it out for yourself) you can find the <a href="https://github.com/jhartikainen/hs-language-php">full source on Github</a>.
</p>]]></description>
      <pubDate>Wed, 23 Jan 2013 11:24:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mattias Geniar's Blog: Input Validation: Using filter_var() Over Regular Expressions]]></title>
      <guid>http://www.phpdeveloper.org/news/11925</guid>
      <link>http://www.phpdeveloper.org/news/11925</link>
      <description><![CDATA[<p>
<a href="http://mattiasgeniar.be/2009/02/07/input-validation-using-filter_var-over-regular-expressions/">This recent post</a> to <i>Mattias Geniar</i>'s blog takes a look at an alternative to trying to catch every single thing that could be filtered on user input with a regular expression - the <a href="http://php.net/filter_var">filter_var</a> function.
</p>
<blockquote>
Just about the biggest time-sink on any project, is the amount of input validation that needs to be done. You _have_ to assume your visitor is <a href="http://www.myconfinedspace.com/2007/07/05/always-code-as-if-the-person-who-will-maintain-your-code-is-a-maniac-serial-killer-that-knows-where-you-live/">a maniac serial killer</a>, out to destroy your application. And you have to prevent it. [...] Thus starts our never-ending battle for user input validation. We can't allow it all so we check every value presented to us. But using PHP's <a href="http://uk.php.net/filter_var">filter_var</a> function, this can be made 100x easier!
</blockquote>
<p>
He includes the long list of filtering types that the function has to offer including sanitizing strings, working with special characters and validating input like email addresses, URLs and IP addresses.
</p>]]></description>
      <pubDate>Wed, 11 Feb 2009 07:55:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: The Joy of Regular Expressions [2]]]></title>
      <guid>http://www.phpdeveloper.org/news/6375</guid>
      <link>http://www.phpdeveloper.org/news/6375</link>
      <description><![CDATA[<p>
<i>Harry Fuecks</i> is back today on the SitePoint PHP Blog with <a href="http://www.sitepoint.com/blogs/2006/09/27/the-joy-of-regular-expressions-2/">part two</a> of his "joy of regular expressions" series, continuing on from <a href="http://www.phpdeveloper.org/news/6356">this previous entry</a>.
</p>
<p>
He jumps right in, summarizing the first part in a small section before getting back into the examples:
<ul>
<li>Hunting for .jp(e)gs
<li>Escaping Meta-Characters
<li>Search and Replace
<li>preg_quote()
<li>preg_replace()
<li>Word Boundaries, Word Characters...and everything else
<li>Sub patterns
<li>Spot the XSS Hole
<li>eval() is evil!
<li>preg_replace_callback()
</ul>
As you can see, it's crammed with just as much infromation as the first part and <a href="http://www.sitepoint.com/blogs/2006/09/27/the-joy-of-regular-expressions-2/">covers a wide range of topics</a> to help you get more in tune with your inner regular expression guru.
</p>]]></description>
      <pubDate>Wed, 27 Sep 2006 09:20:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: Mastering Regular Expressions - now with PHP coverage]]></title>
      <guid>http://www.phpdeveloper.org/news/6137</guid>
      <link>http://www.phpdeveloper.org/news/6137</link>
      <description><![CDATA[<p>
On PHP.net today, there's a note about an addition to the O'Reilly classic book (an asset to any developer's library) "<a href="http://www.amazon.com/gp/product/0596528124/">Mastering Regular Expressions</a>" - a full 48-page chapter on PHP.
</p>
<p>
The book is described as:
</p>
<blockquote>
Mastering Regular Expressions quickly covers the basics of regular-expression syntax, then delves into the mechanics of expression-processing, common pitfalls, performance issues, and implementation-specific differences. Written in an engaging style and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions offers a wealth information that you can put to immediate use.
</blockquote>
<p>
This <a href="http://www.amazon.com/gp/product/0596528124/">new edition</a> is the third release for the book.
</p>]]></description>
      <pubDate>Thu, 24 Aug 2006 19:13:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebProNews: Introduction To Regular Expressions In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5696</guid>
      <link>http://www.phpdeveloper.org/news/5696</link>
      <description><![CDATA[<p>
Linked to from <a href="http://devzone.zend.com/node/view/id/561">this new post</a> on the Zend Developer Zone is a handy <a href="http://www.webpronews.com/expertarticles/expertarticles/wpn-62-20060619IntroductionToRegularExpressionsInPHP.html">regular expressions tutorial</a> that any budding PHP developer should definitely check out.
</p>
<blockquote>
<p>
Man I hate REGEX. Not for what it does, it's a powerful weapon. It's part sniper rifle, part bazooka and extremely useful in some situations. As powerful as it is though, it is a pain to write a good REGEX query; especially when you only do it occasionally. Thankfully, Bernard Peh and the gang over at <a href="http://www.webpronews.com/">WebProNews</a> have released a primer for REGEX in PHP that makes it a little less painful to work with.
</p>
<p>
Appropriately titled <a href="http://www.webpronews.com/expertarticles/expertarticles/wpn-62-20060619IntroductionToRegularExpressionsInPHP.html">Introduction To Regular Expressions In PHP</a>, the article starts with a basic REGEX primer. It's sparse on details but it discusses the different types of characters in a REGEX query. Properly formatted, this would be a great little cheat sheet to have handy.
</p>
</blockquote>
<p>
<i>Cal</i> (on the Zend site) <a href="http://devzone.zend.com/node/view/id/561">mentions</a> that it's a good starting place, but they don't get too deep into the meat of the matter, showing more than just the basics of "this is what this character does". Oh well, I suppose maybe that's being saved for part two...]]></description>
      <pubDate>Tue, 27 Jun 2006 06:11:59 -0500</pubDate>
    </item>
  </channel>
</rss>
