<?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: PHP : Variables vs Constants</title>
	<atom:link href="http://planetozh.com/blog/2006/06/php-variables-vs-constants/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/?source=rss</link>
	<description>A bit of my personal life, mainly focused on my kids. A bit of code, mainly focused on Wordpress and PHP. Overall, bits of nothing in particular.</description>
	<pubDate>Sat, 11 Oct 2008 22:52:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Adriano</title>
		<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/#comment-78516</link>
		<dc:creator>Adriano</dc:creator>
		<pubDate>Fri, 10 Oct 2008 11:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/06/01/php-variables-vs-constants/#comment-78516</guid>
		<description>unbelievable!!!

so? should we use variables?</description>
		<content:encoded><![CDATA[<p>unbelievable!!!</p>
<p>so? should we use variables?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP Sidor &#187; Blog Archive &#187; Snabbast i PHP - variabler eller konstanter</title>
		<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/#comment-37700</link>
		<dc:creator>PHP Sidor &#187; Blog Archive &#187; Snabbast i PHP - variabler eller konstanter</dc:creator>
		<pubDate>Sun, 12 Aug 2007 19:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/06/01/php-variables-vs-constants/#comment-37700</guid>
		<description>[...] Ã¤r egentligen snabbast, Ã¤r det nÃ¥gon stÃ¶rra skillnad? Jag sÃ¥g en bloggpost om detta, men kom fram till att jag ska fortsÃ¤tta med arrayer eftersom det inte verkar vara nÃ¥gon stÃ¶rre [...]</description>
		<content:encoded><![CDATA[<p>[...] Ã¤r egentligen snabbast, Ã¤r det nÃ¥gon stÃ¶rra skillnad? Jag sÃ¥g en bloggpost om detta, men kom fram till att jag ska fortsÃ¤tta med arrayer eftersom det inte verkar vara nÃ¥gon stÃ¶rre [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lf</title>
		<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/#comment-20415</link>
		<dc:creator>lf</dc:creator>
		<pubDate>Tue, 06 Jun 2006 21:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/06/01/php-variables-vs-constants/#comment-20415</guid>
		<description>j'aime bien ton blog, y a pleins de trucs ou je comprends rien, et en plus c'est en anglais, alors Ã§a me rassure.</description>
		<content:encoded><![CDATA[<p>j&#8217;aime bien ton blog, y a pleins de trucs ou je comprends rien, et en plus c&#8217;est en anglais, alors Ã§a me rassure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Hesz</title>
		<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/#comment-16265</link>
		<dc:creator>Roland Hesz</dc:creator>
		<pubDate>Fri, 02 Jun 2006 08:11:58 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/06/01/php-variables-vs-constants/#comment-16265</guid>
		<description>I use constants, mainly to avoid magic numbers, and for values that I use in a lot of places, but can change [urls, directories, filenames, etc.], so I won't forget to change one instance out of 10 :)</description>
		<content:encoded><![CDATA[<p>I use constants, mainly to avoid magic numbers, and for values that I use in a lot of places, but can change [urls, directories, filenames, etc.], so I won&#8217;t forget to change one instance out of 10 :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BB2k</title>
		<link>http://planetozh.com/blog/2006/06/php-variables-vs-constants/#comment-16264</link>
		<dc:creator>BB2k</dc:creator>
		<pubDate>Fri, 02 Jun 2006 08:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://frenchfragfactory.net/ozh/archives/2006/06/01/php-variables-vs-constants/#comment-16264</guid>
		<description>lol at the antispam =)

The difference between variables and CONSTANTS is really an advantage when you use compiled language since the CONSTANT is evaluated one time (at the compilation). this is the matter of the some optimisations algorithms that replace know variables in fonctions to speed up them.
ie . if in C=A+3, A as a knonw value of 3 in this environnement (yes actually this is a constant, but only in a given envirronment) then the code will be transformed in C=6.

In an intepreted language like php, the CONSTANt is replaced each time you run the code and then the optimisation is not so good. It should be better with the use of a pre-compiler like phpaccelerator (http://www.php-accelerator.co.uk/).</description>
		<content:encoded><![CDATA[<p>lol at the antispam =)</p>
<p>The difference between variables and CONSTANTS is really an advantage when you use compiled language since the CONSTANT is evaluated one time (at the compilation). this is the matter of the some optimisations algorithms that replace know variables in fonctions to speed up them.<br />
ie . if in C=A+3, A as a knonw value of 3 in this environnement (yes actually this is a constant, but only in a given envirronment) then the code will be transformed in C=6.</p>
<p>In an intepreted language like php, the CONSTANt is replaced each time you run the code and then the optimisation is not so good. It should be better with the use of a pre-compiler like phpaccelerator (http://www.php-accelerator.co.uk/).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
