<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Intricacies of PHP compared to Ruby</title>
	<atom:link href="http://www.peterkrantz.com/2008/php-for-beginners/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peterkrantz.com/2008/php-for-beginners/</link>
	<description>A blog about technology, visualization, music and unmanned vehicle experiments</description>
	<pubDate>Sun, 06 Jul 2008 06:17:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Marcos Ricardo</title>
		<link>http://www.peterkrantz.com/2008/php-for-beginners/#comment-2169</link>
		<dc:creator>Marcos Ricardo</dc:creator>
		<pubDate>Tue, 01 Jan 2008 16:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterkrantz.com/2008/php-for-beginners/#comment-2169</guid>
		<description>That is the reason I like POLS.

Even if I program in PHP for a couple of years, this kind of behavior will always surprises me.

Let me ask you about hexadecimal operations in PHP.</description>
		<content:encoded><![CDATA[<p>That is the reason I like POLS.</p>
<p>Even if I program in PHP for a couple of years, this kind of behavior will always surprises me.</p>
<p>Let me ask you about hexadecimal operations in PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.peterkrantz.com/2008/php-for-beginners/#comment-2168</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 01 Jan 2008 10:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterkrantz.com/2008/php-for-beginners/#comment-2168</guid>
		<description>If you want to do a comparison by type and value in PHP you should use === or !==. In that case it will act the same as Ruby. If you have notices turned on for PHP it will warn about $d not being defined if I remember correctly.

The reason PHP does this is that it supports the usage of strings containing a numeric value as a numeric value. So if you have a string containing the number "3" you can multiply another number with the string. If a string starts with a number and after that contains some chars the number at the start of the string will be used. If it doesn't start out with a number PHP will threat the string as if it's the number 0.

So yeah, you have to be aware of this behavior of PHP when programming in PHP but as you can see there are simple ways to avoid this "issue".</description>
		<content:encoded><![CDATA[<p>If you want to do a comparison by type and value in PHP you should use === or !==. In that case it will act the same as Ruby. If you have notices turned on for PHP it will warn about $d not being defined if I remember correctly.</p>
<p>The reason PHP does this is that it supports the usage of strings containing a numeric value as a numeric value. So if you have a string containing the number &#8220;3&#8243; you can multiply another number with the string. If a string starts with a number and after that contains some chars the number at the start of the string will be used. If it doesn&#8217;t start out with a number PHP will threat the string as if it&#8217;s the number 0.</p>
<p>So yeah, you have to be aware of this behavior of PHP when programming in PHP but as you can see there are simple ways to avoid this &#8220;issue&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
