<?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: Undefined Constant Is a String?</title>
	<atom:link href="http://benramsey.com/archives/undefined-constant-is-a-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://benramsey.com/archives/undefined-constant-is-a-string/</link>
	<description>PHP and Other Techno-babble</description>
	<lastBuildDate>Mon, 01 Feb 2010 11:59:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: kanenas</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-302912</link>
		<dc:creator>kanenas</dc:creator>
		<pubDate>Mon, 29 Jun 2009 01:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-302912</guid>
		<description>Old post, but for those coming across this page who are also wondering &quot;why?&quot;, the feature was inspired by Perl. Barewords in Perl become strings, unless you use the &quot;strict&quot; module. The feature, both in Perl and PHP, is not officially deprecated but is considered harmful.

Reference:
Wall, Larry; &quot;&lt;a href=&quot;http://books.google.com/books?id=oh8lz4A3sUsC&amp;pg=PA860&amp;lpg=PA860&amp;source=bl&amp;ots=NcP3iiBsXf&amp;sig=117Y6AtgY6KcWbJW-yEpUhmjzvE&amp;hl=en&amp;ei=8RBISp3UJoqCNLDN6KsC&quot; rel=&quot;nofollow&quot;&gt;Programming Perl&lt;/a&gt;&quot;, 3rd Ed; p860</description>
		<content:encoded><![CDATA[<p>Old post, but for those coming across this page who are also wondering &#8220;why?&#8221;, the feature was inspired by Perl. Barewords in Perl become strings, unless you use the &#8220;strict&#8221; module. The feature, both in Perl and PHP, is not officially deprecated but is considered harmful.</p>
<p>Reference:<br />
Wall, Larry; &#8220;<a href="http://books.google.com/books?id=oh8lz4A3sUsC&#038;pg=PA860&#038;lpg=PA860&#038;source=bl&#038;ots=NcP3iiBsXf&#038;sig=117Y6AtgY6KcWbJW-yEpUhmjzvE&#038;hl=en&#038;ei=8RBISp3UJoqCNLDN6KsC" rel="nofollow">Programming Perl</a>&#8221;, 3rd Ed; p860</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: terry chay</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7930</link>
		<dc:creator>terry chay</dc:creator>
		<pubDate>Sat, 23 Dec 2006 23:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7930</guid>
		<description>Am I showing my age when I was really confused that you were confused with the contants parsed as strings when not defined?</description>
		<content:encoded><![CDATA[<p>Am I showing my age when I was really confused that you were confused with the contants parsed as strings when not defined?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7816</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 21 Dec 2006 23:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7816</guid>
		<description>This problem has bit me before too.

The worst is when people do conditional checks against undefined constants...

if(SUPER_CONSTANT){
do this
}

It will always pass if the constant isn&#039;t defined. Now I always develop with notices turned on.</description>
		<content:encoded><![CDATA[<p>This problem has bit me before too.</p>
<p>The worst is when people do conditional checks against undefined constants&#8230;</p>
<p>if(SUPER_CONSTANT){<br />
do this<br />
}</p>
<p>It will always pass if the constant isn&#8217;t defined. Now I always develop with notices turned on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7791</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Thu, 21 Dec 2006 15:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7791</guid>
		<description>You will see this a lot in legacy code that many developers have worked on.  The current codeset that i am working on has a ton of $foo[bar] and throws many errors about undefined constants.  Time to cleanup and use proper methods.</description>
		<content:encoded><![CDATA[<p>You will see this a lot in legacy code that many developers have worked on.  The current codeset that i am working on has a ton of $foo[bar] and throws many errors about undefined constants.  Time to cleanup and use proper methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHPDeveloper.org</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7783</link>
		<dc:creator>PHPDeveloper.org</dc:creator>
		<pubDate>Thu, 21 Dec 2006 13:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7783</guid>
		<description>&lt;strong&gt;Ben Ramsey&#039;s Blog: Undefined Constant Is a String?&lt;/strong&gt;

</description>
		<content:encoded><![CDATA[<p><strong>Ben Ramsey&#8217;s Blog: Undefined Constant Is a String?</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BEToptions</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7759</link>
		<dc:creator>BEToptions</dc:creator>
		<pubDate>Wed, 20 Dec 2006 23:29:28 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7759</guid>
		<description>&lt;strong&gt;PHP Error reporting&lt;/strong&gt;

Yet more reasons why error reporting should be set to E_ALL.

I have found the easiest way to do this in WAGERplayer is to add an error_reporting(E_ALL) to your scripts, just after including admin_config.php, as too much of the old stuff will emit a lot</description>
		<content:encoded><![CDATA[<p><strong>PHP Error reporting</strong></p>
<p>Yet more reasons why error reporting should be set to E_ALL.</p>
<p>I have found the easiest way to do this in WAGERplayer is to add an error_reporting(E_ALL) to your scripts, just after including admin_config.php, as too much of the old stuff will emit a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hartmut</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7757</link>
		<dc:creator>hartmut</dc:creator>
		<pubDate>Wed, 20 Dec 2006 22:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7757</guid>
		<description>Unquoted strings were a feature of PHP before PHP 3.0,
quoting strings was optional if there was no whitespace within the string.

With the introduction of constants in PHP 3 this has become a backward
compatibility burden, but even with the warning added in at least 4.0
(or was it already in 3.0?) there is still lots of code out there that
relies on this.

But on the other hand this one was the easiest to fix and the least likely to break of the NOTICE level warnings that i have encountered in making legacy code E_NOTICE free, there are way more serious things reported by it like use of uninitialized variables etc. 

So always coding with E_NOTICE on is a must for any serious PHP developer IMHO, and just the fact that you inherited legacy code
to maintain is no excuse to have it set to off ... but that might just be me ...</description>
		<content:encoded><![CDATA[<p>Unquoted strings were a feature of PHP before PHP 3.0,<br />
quoting strings was optional if there was no whitespace within the string.</p>
<p>With the introduction of constants in PHP 3 this has become a backward<br />
compatibility burden, but even with the warning added in at least 4.0<br />
(or was it already in 3.0?) there is still lots of code out there that<br />
relies on this.</p>
<p>But on the other hand this one was the easiest to fix and the least likely to break of the NOTICE level warnings that i have encountered in making legacy code E_NOTICE free, there are way more serious things reported by it like use of uninitialized variables etc. </p>
<p>So always coding with E_NOTICE on is a must for any serious PHP developer IMHO, and just the fact that you inherited legacy code<br />
to maintain is no excuse to have it set to off &#8230; but that might just be me &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7756</link>
		<dc:creator>Pierre</dc:creator>
		<pubDate>Wed, 20 Dec 2006 22:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7756</guid>
		<description>Slap your coworker with a E_ALL&#124;E_STRICT bat and don&#039;t waste so much ink to explain something that exists since years ;-)

The fact that you ask if it is really a feature makes me wonder ... bah :)</description>
		<content:encoded><![CDATA[<p>Slap your coworker with a E_ALL|E_STRICT bat and don&#8217;t waste so much ink to explain something that exists since years <img src='http://benramsey.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The fact that you ask if it is really a feature makes me wonder &#8230; bah <img src='http://benramsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony2001</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7755</link>
		<dc:creator>tony2001</dc:creator>
		<pubDate>Wed, 20 Dec 2006 21:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7755</guid>
		<description>&gt;Note that this behavior of constants continues to exist even in the latest versions of PHP,
&gt;including 5.2 and 6.0.0-dev. Why? I donâ€™t know.

There are 0 reasons to change it except for if you&#039;re to break tons of poorly written apps (even if they deserve it).</description>
		<content:encoded><![CDATA[<p>>Note that this behavior of constants continues to exist even in the latest versions of PHP,<br />
>including 5.2 and 6.0.0-dev. Why? I donâ€™t know.</p>
<p>There are 0 reasons to change it except for if you&#8217;re to break tons of poorly written apps (even if they deserve it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Planeta Debian &#187; Undefined Constant Is a String?</title>
		<link>http://benramsey.com/archives/undefined-constant-is-a-string/comment-page-1/#comment-7754</link>
		<dc:creator>Planeta Debian &#187; Undefined Constant Is a String?</dc:creator>
		<pubDate>Wed, 20 Dec 2006 21:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/undefined-constant-is-a-string/#comment-7754</guid>
		<description>[...] Original post by Ben Ramsey [...]</description>
		<content:encoded><![CDATA[<p>[...] Original post by Ben Ramsey [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
