<?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 21:30:19 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DevShed: Validating Boolean Values and Float Numbers with Filters in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/13003</guid>
      <link>http://www.phpdeveloper.org/news/13003</link>
      <description><![CDATA[<p>
Continuing their "validation in PHP" series, DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Validating-Boolean-Values-and-Float-Numbers-with-Filters-in-PHP-5/">this new tutorial</a> looking at the validation of boolean values and float numbers in PHP5 applications (with the <a href="http://php.net/filter">filter extension</a>).
</p>
<blockquote>
As you learned in previous parts of the series, the filter extension permits you to validate elements of a given array very easily as well. Therefore, in this fourth chapter I'm going to explain how to check for Boolean values in arrays, as well as how to validate float numbers using another handy filter.
</blockquote>
<p>
<a href="http://www.devshed.com/c/a/PHP/Validating-Boolean-Values-and-Float-Numbers-with-Filters-in-PHP-5/2/">the examples</a> are pretty simple, running a <a href="http://php.net/filter_var">filter_var</a> on the values to check if it's a boolean and to require that the set of values comes in as an array.
</p>]]></description>
      <pubDate>Thu, 06 Aug 2009 07:51:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Danne Lundqvist's Blog: Zend Framework and locales]]></title>
      <guid>http://www.phpdeveloper.org/news/12258</guid>
      <link>http://www.phpdeveloper.org/news/12258</link>
      <description><![CDATA[<p>
In <a href="http://www.dotvoid.com/2009/04/zend-framework-and-locales/">a new post</a> to his blog <i>Danne Lundqvist</i> take a look at using locales in the <a href="http://framework.zend.com">Zend Framework</a> and a "gotcha" that made him look deeper.
</p>
<blockquote>
Last night I spent a couple of hours with <a href="http://framework.zend.com/">Zend Framework</a> and especially Zend_Form. I discovered, and now also <a href="http://framework.zend.com/issues/browse/ZF-6175">reported as ZF-6175</a>, a bug in Zend_Validate_Float when using a locale with a decimal point other than ".". There are unit tests but none that test Zend_Validate_Float under a different locale.
</blockquote>
<p>
He points out that floats are locale-aware in PHP itself (code examples) and how the current Zend_Validate float package handled it. He has already proposed a fix for the problem and, until its changed in the framework, has provided the simplified code you can use.
</p>]]></description>
      <pubDate>Wed, 01 Apr 2009 13:44:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Sanitation with PHP filter_var()]]></title>
      <guid>http://www.phpdeveloper.org/news/7115</guid>
      <link>http://www.phpdeveloper.org/news/7115</link>
      <description><![CDATA[<p>
In working on a new filter for his <a href="http://www.solarphp.com">Solar framework</a>, <i>Paul Jones</i> <a href="http://paul-m-jones.com/blog/?p=240">discovered that</a> the "float" sanitizer in the new filter extension (PHP 5.2+) doesn't quite work as expected.
</p>
<blockquote>
I found a problem with the "float" sanitizing function in the 5.2.0 release, and thought others might want to be aware of it. In short, if you allow decimal places, the sanitizer allows any number of decimal points, not just one, and it returns an un-sanitary float.
</blockquote>
<p>
He <a href="http://paul-m-jones.com/blog/?p=240">includes the text</a> of the bug he submitted as an example of how the error might happen and, despite it being marked <a href="http://bugs.php.net/?id=40156">bogus</a>, <i>Paul still holds that things are still not working like they should.
</p>
<p>
You can also check out <a href="http://blog.thepimp.net/index.php/post/2007/01/17/why-it-works-as-you-expect-if-you-take-2-second-to-read-the-manual-or-RTFM">Pierre-Alain Joye's response</a> to this over on his blog.
</p>]]></description>
      <pubDate>Wed, 17 Jan 2007 15:22:00 -0600</pubDate>
    </item>
  </channel>
</rss>
