<?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>Sat, 18 May 2013 14:22:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Scalar Type Hinting and DB Design Slides]]></title>
      <guid>http://www.phpdeveloper.org/news/5613</guid>
      <link>http://www.phpdeveloper.org/news/5613</link>
      <description><![CDATA[<p>
Derick Rethans has two blog posts for us today, <a href="http://derickrethans.nl/typehints_for_scalar_types.php">the first</a> details a <a href="http://files.derickrethans.nl/patches/ze-type-hint-2006-06-17.diff.txt">patch he created</a> which allows us to use type hints for all variable types in PHP.
</p>

<p>
Derick himself admits that its probably not the best approach:
</p>

<blockquote> 
The patch is most likely not the best way of implementing this either, and I am also not sure if this patch should be applied to PHP's CVS at all. 
</blockquote>

<p>
He offers the following as an example of how this would be used:
</p>

<blockquote>
<p>
function foo2( integer $i, float $f, bool $b ) { }
<br />
foo2( 'string', 42, 49.9 );
</p>

<p>
The example above should show:
</p>

<p>
Catchable fatal error: Argument 1 passed to foo2() must be of type integer, string given, called in /tmp/test.php on line 16 and defined in /tmp/test.php on line 12
</p>
</blockquote>

<p>
Derick also posted his <a href="http://derickrethans.nl/database_design_slides_finally.php">Database Design Slides</a> from his talk earlier this year at <a href="http://phparch.com">php|architects</a> php|tek
</p>]]></description>
      <pubDate>Sat, 17 Jun 2006 18:52:04 -0500</pubDate>
    </item>
  </channel>
</rss>
