<?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>xlab &#187; programistyczny fail</title>
	<atom:link href="http://xlab.pl/tag/programistyczny-fail/feed/" rel="self" type="application/rss+xml" />
	<link>http://xlab.pl</link>
	<description>XSolve laboratory - dzielimy się tym co wiemy...</description>
	<lastBuildDate>Mon, 09 Jan 2012 15:29:06 +0000</lastBuildDate>
	<language>pl</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Programistyczny fail: &#8222;argument musi być stringiem, przekazano string&#8221;</title>
		<link>http://xlab.pl/programistyczny-fail-argument-musi-byc-stringiem-przekazano-string/</link>
		<comments>http://xlab.pl/programistyczny-fail-argument-musi-byc-stringiem-przekazano-string/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 16:58:55 +0000</pubDate>
		<dc:creator>Mateusz Kubiczek</dc:creator>
				<category><![CDATA[Programowanie PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programistyczny fail]]></category>

		<guid isPermaLink="false">http://www.xlab.pl/?p=397</guid>
		<description><![CDATA[Dosyć ciekawy błąd przytrafił się koledze piszącemu w PHP: Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given, called in /Users/madmatt/Documents/Projects/foobar/ dosyć mocny WTF. Kod, który to powoduje: function foo(string $s) { } foo("bar"); Próbujemy tutaj ograniczyć przyjmowane argumenty przez funkcję foo do zmiennych typu string. Co ciekawe, [...]]]></description>
			<content:encoded><![CDATA[<p>Dosyć ciekawy błąd przytrafił się koledze piszącemu w PHP:</p>
<pre name="code">
Catchable fatal error:
Argument 1 passed to foo() must be an instance of string, string given, called in
/Users/madmatt/Documents/Projects/foobar/</pre>
<p>dosyć mocny WTF. Kod, który to powoduje:</p>
<pre name="code" class="php">
function foo(string $s)
{
}
foo("bar");</pre>
<p>Próbujemy tutaj ograniczyć przyjmowane argumenty przez funkcję <em>foo</em> do zmiennych typu string. Co ciekawe, to nie bug, tylko feature (lub też brak tegoż feature). Okazuje się, że php tego nie obsługuje. Powie nam to linijka na samym końcu <a href="http://us2.php.net/manual/en/language.oop5.typehinting.php">rozdziału o Type Hinting:</a></p>
<blockquote><p>
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.</p></blockquote>
<p>Czyli tablice, klasy &#8211; tak, podstawowe typy nie?<br />
Too bad, ale z treścią błędu mogli się bardziej postarać. A to jeszcze inny<a href="http://en.wikipedia.org/wiki/Scope_resolution_operator"> klasyk z PHP:</a></p>
<pre name="code">
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in
Command line code on line 1</pre>
<p>To po hebrajsku. Znacie inne tego typu niespodzianki rodem z PHP?</p>
]]></content:encoded>
			<wfw:commentRss>http://xlab.pl/programistyczny-fail-argument-musi-byc-stringiem-przekazano-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programistyczny fail: Błąd bez błędu</title>
		<link>http://xlab.pl/programistyczny-fail-blad-bez-bledu/</link>
		<comments>http://xlab.pl/programistyczny-fail-blad-bez-bledu/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 10:49:37 +0000</pubDate>
		<dc:creator>Mateusz Kubiczek</dc:creator>
				<category><![CDATA[Ogólne]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[programistyczny fail]]></category>
		<category><![CDATA[śmieszne]]></category>

		<guid isPermaLink="false">http://www.xlab.pl/?p=227</guid>
		<description><![CDATA[Ciekawy błąd (nie błąd?) przytrafił się Michałowi Organkowi przy próbie wysłania smsa z Kadu&#8230;]]></description>
			<content:encoded><![CDATA[<p>Ciekawy błąd (nie błąd?) przytrafił się <a href="http://twitter.com/or6an">Michałowi Organkowi</a> przy próbie wysłania smsa z Kadu&#8230;</p>
<div id="attachment_228" class="wp-caption alignnone" style="width: 260px"><img class="size-full wp-image-228" title="soFyUl" src="http://www.xlab.pl/wp-content/uploads/2009/08/soFyUl.png" alt="Błąd bez błędu" width="250" height="166" /><p class="wp-caption-text">To taki błąd, tylko że nie błąd.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://xlab.pl/programistyczny-fail-blad-bez-bledu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

