<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/rss20.xsl" media="screen"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://jstubbs.blogspirit.com/general/index.rss" rel="self" type="application/rss+xml" />
<title>Jason Stubbs - general</title>
<description>You want a summary?</description>
<link>http://jstubbs.blogspirit.com/general/</link>
<lastBuildDate>Thu, 26 Jul 2007 17:48:29 +0900</lastBuildDate>
<generator>blogSpirit.com</generator>
<copyright>All Rights Reserved</copyright>
<item>
<guid isPermaLink="true">http://jstubbs.blogspirit.com/archive/2007/05/01/php-idiosyncrasies.html</guid>
<title>PHP Idiosyncrasies</title>
<link>http://jstubbs.blogspirit.com/archive/2007/05/01/php-idiosyncrasies.html</link>
<author>noreply@blogspirit.com ()</author>
<category>General</category>
<pubDate>Tue, 01 May 2007 18:50:00 +0900</pubDate>
<description>
&lt;p&gt;Three reasons to make sure you know your programming language:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: lightblue; font-family: monospace&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;function test($code) {&lt;br /&gt;    $result = @eval(&quot;return ({$code});&quot;);&lt;br /&gt;    print ($result ? 'true  ' : 'false ') . &quot;$coden&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;test( &quot;gettype(key(array('s' =&gt; ''))) == 'string'&quot; );&lt;br /&gt;test( &quot;gettype(key(array('1' =&gt; ''))) == 'string'&quot; );&lt;br /&gt;&lt;br /&gt;test( &quot;'s' == 0&quot; );&lt;br /&gt;test( &quot;0 == 's'&quot; );&lt;br /&gt;&lt;br /&gt;test( &quot;$x == $x++&quot; );&lt;br /&gt;test( &quot;(int)$x == $x++&quot; );&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;And here's the output:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: lightgreen; font-family: monospace&quot;&gt;true  gettype(key(array('s' =&gt; ''))) == 'string'&lt;br /&gt;false gettype(key(array('1' =&gt; ''))) == 'string'&lt;br /&gt;true  's' == 0&lt;br /&gt;true  0 == 's'&lt;br /&gt;false $x == $x++&lt;br /&gt;true  (int)$x == $x++&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;In case you didn't catch what PHP is doing on the last pair, here's the equivalent processing in PHP code:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: lightblue&quot;; font-family: monospace&gt;$y = &amp;$x;&lt;br /&gt;$x++;&lt;br /&gt;($x == $y)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;When casting &lt;code&gt;$x&lt;/code&gt; with &lt;code&gt;(int)&lt;/code&gt;, PHP is no longer able to make use of the &quot;let's just use a reference&quot; over-optimization. Personally, I think it's a bug that the behaviour differs between the two.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Debuggers beware! ;)&lt;/p&gt;
</description>
</item>
<item>
<guid isPermaLink="true">http://jstubbs.blogspirit.com/archive/2006/03/29/blogs-the-latest-internet-virus.html</guid>
<title>Blogs... the latest Internet virus</title>
<link>http://jstubbs.blogspirit.com/archive/2006/03/29/blogs-the-latest-internet-virus.html</link>
<author>noreply@blogspirit.com ()</author>
<category>General</category>
<pubDate>Wed, 29 Mar 2006 00:40:00 +0900</pubDate>
<description>
With only one (real) entry of my own and a few words via text chat, I've managed to convince my best mate to start a blog of his own. For those that aren't technically minded, while I do/will try to cater for you too, I'm sure you'll find a lot of more mind tingling thoughts over his way. Check it out at &lt;a href=&quot;http://seanwilliams.blogspirit.com/&quot; target=&quot;_blank&quot;&gt;http://seanwilliams.blogspirit.com/&lt;/a&gt;.
</description>
</item>
<item>
<guid isPermaLink="true">http://jstubbs.blogspirit.com/archive/2006/03/25/a-new-trend-begins.html</guid>
<title>A new trend begins?</title>
<link>http://jstubbs.blogspirit.com/archive/2006/03/25/a-new-trend-begins.html</link>
<author>noreply@blogspirit.com ()</author>
<category>General</category>
<pubDate>Sat, 25 Mar 2006 10:20:00 +0900</pubDate>
<description>
I've finally started a blog. This service does everything I want - categories, template editing, unicode...&lt;br /&gt;&lt;br /&gt;ブログをやっと始めたよ〜。このブログスピリットはカテゴリー、テンプレート更新、ユニコードなどわたしがしたいことが全て出来ます。
</description>
</item>
</channel>
</rss>