<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Developer Oracles &#187; migrating php4 php5</title>
	<atom:link href="http://devoracles.com/tag/migrating-php4-php5/feed" rel="self" type="application/rss+xml" />
	<link>http://devoracles.com</link>
	<description></description>
	<lastBuildDate>Sun, 21 Mar 2010 11:05:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating from php4 to php5? Pros and cons</title>
		<link>http://devoracles.com/migrating-from-php4-to-php5-pros-and-cons/11</link>
		<comments>http://devoracles.com/migrating-from-php4-to-php5-pros-and-cons/11#comments</comments>
		<pubDate>Thu, 10 Jul 2008 17:38:17 +0000</pubDate>
		<dc:creator>Gary Illyes</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[migrating php4 php5]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[php 4]]></category>
		<category><![CDATA[php 5]]></category>
		<category><![CDATA[php4]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[upgrading php]]></category>

		<guid isPermaLink="false">http://devoracles.com/?p=11</guid>
		<description><![CDATA[You think it&#8217;s hard? You think you will brake codes?
Why? Probably cos everyone told you so. I tell you something else: You have nothing to fear of.
Maybe the title is a bit unrelated to the post as I can&#8217;t seem to find a valid and justified con against it.
Anyway, some thing you should know: PHP [...]]]></description>
			<content:encoded><![CDATA[<p>You think it&#8217;s hard? You think you will brake codes?<br />
Why? Probably cos everyone told you so. I tell you something else: You have nothing to fear of.</p>
<p>Maybe the title is a bit unrelated to the post as I can&#8217;t seem to find a valid and justified con against it.<br />
Anyway, some thing you should know: PHP 5 was released cos it contains dozens of fixes, upgrades. It wasn&#8217;t released cos the team which manages the project had a godly touch or they were drunk and when they woke up all they knew was they have to release a new PHP. No. There was a very good reason, and just for the matter of the argument, when something is free anyway, why wouldn&#8217;t you upgrade to a better, improved version? Huh?</p>
<p>The guy who I work with day-by-day, and probably my best friend as well, will say &#8220;don&#8217;t fix what is not broken&#8221;. I say, if something contains bugs, isn&#8217;t that thing broken?</p>
<p>So, as I said, you have nothing to fear of, much likely your code will work on the new platform as well, sincerely, when I upgraded to PHP 5 none of my scripts stopped working and there are a few hundred of separate scripts, but just to be sure, let&#8217;s check some things.</p>
<p>First of all, i don&#8217;t know if you know or not, there are some reserved words you can&#8217;t define in your scripts as variables or constants. That&#8217;s clear I guess, the &#8220;why don&#8217;t&#8221; has a simple answer&#8230; well, two: the first is, cos this is what the developers of PHP said, secondly cos why would you want to define a constant which was previously defined in the PHP core as a function. For example, &#8220;echo&#8221;, would you redefine it as a constant? I hope you wouldn&#8217;t. Also, the same applies to reserved words like &#8220;FALSE&#8221;, &#8220;TRUE&#8221;, &#8220;NULL&#8221;, etc.  as these are reserved constants. <a href="http://www.php.net/manual/en/reserved.php#reserved.keywords">Have a look on php.net on the reserved keywords list, well, table (link)</a>. Also, someone asked me of why &#8220;parent&#8221; and &#8220;self&#8221; throws errors when using them in scripts as (re)defined constants. Well, they are inbuilt classes, simple.<br />
Another major change is that array_merge() accepts only arrays. This should be obvious anyway but as of PHP5 it returns NULL. There are some other changes as well, <a href="http://www.php.net/manual/en/migration5.incompatible.php">php.net has a more comprehensive list here (link)</a>.</p>
<p>And probably that was all you feared of. Really. <img src='http://devoracles.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devoracles.com/migrating-from-php4-to-php5-pros-and-cons/11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
