<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Problems arising from PHP type casting in ==</title>
	<atom:link href="http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/</link>
	<description>tweaks and hacks, java, python, music, home and ???</description>
	<pubDate>Thu, 08 Jan 2009 17:05:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aaron Saray</title>
		<link>http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/comment-page-1/#comment-764</link>
		<dc:creator>Aaron Saray</dc:creator>
		<pubDate>Fri, 07 Nov 2008 22:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/#comment-764</guid>
		<description>What I don't understand about your last comment is ... if you are searching with a string, and want an exact match, you should use the strict item.  If it could be a string or an integer key - as you mentioned, then you wouldn't use that option, right?</description>
		<content:encoded><![CDATA[<p>What I don&#8217;t understand about your last comment is &#8230; if you are searching with a string, and want an exact match, you should use the strict item.  If it could be a string or an integer key - as you mentioned, then you wouldn&#8217;t use that option, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/comment-page-1/#comment-279</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Mon, 10 Mar 2008 20:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2008/03/08/problems-arising-from-php-type-casting-in/#comment-279</guid>
		<description>Just a quick comment before get tons of them - yes, I am aware of the availability of the third argument to array_search and in_array - the 'strict' switch. That works fine in most situations, but not always - such as searching for a value in an array created by array_keys when the value you are searching with is a string, but may also be a valid integer. In the array it will be stored as an int and will fail on the search. (That is the issue I ran into at work.)

The other place that strict does not work is in switch statements, where you don't have that option.</description>
		<content:encoded><![CDATA[<p>Just a quick comment before get tons of them - yes, I am aware of the availability of the third argument to array_search and in_array - the &#8217;strict&#8217; switch. That works fine in most situations, but not always - such as searching for a value in an array created by array_keys when the value you are searching with is a string, but may also be a valid integer. In the array it will be stored as an int and will fail on the search. (That is the issue I ran into at work.)</p>
<p>The other place that strict does not work is in switch statements, where you don&#8217;t have that option.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
