<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Too Far Afield &#187; fail</title>
	<atom:link href="http://blog.nachtarbeiter.net/tag/fail/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nachtarbeiter.net</link>
	<description></description>
	<lastBuildDate>Tue, 16 Feb 2010 07:02:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Type Hinting in PHP</title>
		<link>http://blog.nachtarbeiter.net/2009/09/05/type-hinting-in-php/</link>
		<comments>http://blog.nachtarbeiter.net/2009/09/05/type-hinting-in-php/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 03:26:21 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.nachtarbeiter.net/?p=874</guid>
		<description><![CDATA[PHP 5 introduces Type Hinting. But it does so in the usual PHP way: It&#8217;s neither fish nor fowl. You&#8217;ll be exited at first when you discover the new feature. And then you&#8217;ll be disappointed. Because things do not work like you&#8217;d expect. Suppose you do something like this: &#60;?php &#160; function foo ( string [...]]]></description>
			<content:encoded><![CDATA[<p>PHP 5 introduces Type Hinting. But it does so in the usual PHP way: It&#8217;s neither fish nor fowl. You&#8217;ll be exited at first when you discover the new feature. And then you&#8217;ll be disappointed. Because things do not work like you&#8217;d expect. Suppose you do something like this:</p>
<ol class="code">
<li><code>&lt;?php</code></li>
<li><code>&nbsp;</code></li>
<li><code>function foo ( string $bar) {</code></li>
<li><code>   echo $bar;</code></li>
<li>}</li>
<li><code>foo ('Hello World!');</code></li>
<li><code>&nbsp;</code></li>
<li><code>?&gt;</code></li>
</ol>
<p>What happens, when you execute the above code? You will get a rather cryptic error message:</p>
<ol class="code">
<li><code>Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given.</code></li>
</ol>
<p>So the method expected a string as the first parameter and you passed a string to it, but PHP chose to throw up regardless. Great, isn&#8217;t it? Of course, the reason for this is right at the very bottom of the <a href="http://de.php.net/manual/en/language.oop5.typehinting.php">PHP documentation on Type Hinting</a>. All the way down the page below a number of examples:</p>
<p><cite>Type Hints can only be of the object and array  (since PHP 5.1) type. Traditional type hinting with int and string isn&#8217;t supported.</cite></p>
<p>Doh!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachtarbeiter.net/2009/09/05/type-hinting-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EU Parliament elections 2009</title>
		<link>http://blog.nachtarbeiter.net/2009/06/03/eu-elections/</link>
		<comments>http://blog.nachtarbeiter.net/2009/06/03/eu-elections/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 21:19:15 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[elections]]></category>
		<category><![CDATA[eu]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://blog.nachtarbeiter.net/?p=785</guid>
		<description><![CDATA[The ballot doesn&#8217;t really fit into the envelope. It&#8217;s totally crumpled right now. Epic FAIL! Anyway, if you&#8217;re living in Europe, vote. Tomorrow, on Friday, on Saturday or on Sunday, depending on where you live. The parliament doesn&#8217;t have to say as much on EU policy as it should have, but it&#8217;s gaining influence. Some [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_784" class="wp-caption aligncenter" style="width: 510px"><img src="/wp-content/uploads/2009/06/europawahl.jpg" alt="EU Parliament elections postal vote ballot and envelope" title="EU Parliament elections postal vote ballot and envelope" width="500" height="375" class="size-full wp-image-784" /><p class="wp-caption-text">EU elections</p></div>
<p>The ballot doesn&#8217;t really fit into the envelope. It&#8217;s totally crumpled right now. Epic FAIL! Anyway, if you&#8217;re living in Europe, vote. Tomorrow, on Friday, on Saturday or on Sunday, <a href="http://en.wikipedia.org/wiki/European_Parliament_election,_2009#Overview">depending on where you live</a>. The parliament doesn&#8217;t have to say as much on EU policy as it should have, but it&#8217;s gaining influence. Some people say that European policy affects up to 80% of your local legislation right now. While I do not necessarily agree to such statements, it&#8217;s probably a good idea to vote anyway. That much for a public service announcement.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachtarbeiter.net/2009/06/03/eu-elections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
