<?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>Professional PHP &#187; compatibility-testing</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/compatibility-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Tue, 20 Oct 2009 00:57:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP 5.1 is out</title>
		<link>http://www.procata.com/blog/archives/2005/11/25/php-51-is-out/</link>
		<comments>http://www.procata.com/blog/archives/2005/11/25/php-51-is-out/#comments</comments>
		<pubDate>Fri, 25 Nov 2005 19:56:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[compatibility-testing]]></category>
		<category><![CDATA[php-namespaces]]></category>
		<category><![CDATA[php-references]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=160</guid>
		<description><![CDATA[PHP 5.1.0 is out.  There is alot of good stuff in this release and it is a major milestone.  May PHP 5.1.2 be as successful as PHP 4.1.2.
I say 5.1.2 because it looks like there are is going to be at least one, possibly two bug fix releases to follow.  There is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.php.net/">PHP 5.1.0</a> is out.  There is alot of good stuff in this release and it is a major milestone.  May PHP 5.1.2 be as successful as PHP 4.1.2.</p>
<p>I say 5.1.2 because it looks like there are is going to be at least one, possibly two bug fix releases to follow.  There is a bit of a kerfuffle about the introduction of a date class into PHP 5.1rc6, which conflicts with the current PEAR date class.  Unfortunately, the naming conflict is not (yet) documented in the <a href="http://www.php.net/README_UPGRADE_51.php">upgrade notes</a> which I praised in my <a href="http://www.procata.com/blog/archives/2005/11/22/a-glimpse-into-the-future-php-6/">PHP 6 post</a> just a couple of days ago.</p>
<p>Ok, so reserving common class names in the release candidate just before the release, during a major holiday week (in the US at least) is probably a mistake.  I don&#8217;t disagree with PHP reserving the Date class.  Honestly, anyone using that name should half expect it.  However, I don&#8217;t think anyone likes surprises, especially late in a release cycle.  But, people are not machines and sometimes mistakes are made.  (To use another cliche, sometimes sausage making is not pretty.)</p>
<p>After the <a href="http://www.procata.com/blog/archives/2005/10/20/of-php-references-and-compatibility/">Reference compatibility thing</a> I thought there was supposed to be a <a href="http://www.derickrethans.nl/php_release_process.php">process in place</a> to catch surprises like this.  What happened? </p>
<p>Some people are pointing to this naming conflict as evidence of the dire need for namespace support in PHP.  Fair enough.</p>
<p>So in this case the process for detecting backward compatibility breaks relied on a large group of people testing their applications through a rapid succession of release candidates.  Since I agree with the rapid succession of release candidates, I have to see the weak part of the process as relying on people to test stuff.  After all, people aren&#8217;t machines.</p>
<p>However, machines ARE machines and automated compatibility testing could have caught this.  I have a corpus of PHP code with automated tests that I could donate to a BC testing lab.  I&#8217;m sure other people do.  I can&#8217;t necessarily download a new release candidate and run it every other day, but I could package my code up and send it someplace to be run.  Where can I send it?</p>
<p>(Yeah, I know calling for BC testing lab without volunteering to run it is the open source equivalent of the <a href="http://en.wikipedia.org/wiki/Unfunded_mandates">unfunded mandate</a>.  But hey, its my blog and I&#8217;ll suggest, complain or critique if I want to.  <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>One last thing, don&#8217;t let a few minor issues overshadow the good hard work that went into this release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/11/25/php-51-is-out/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Backward compatibilty and web host adoption of PHP 5</title>
		<link>http://www.procata.com/blog/archives/2005/10/02/backward-compatibilty-and-web-host-adoption-of-php-5/</link>
		<comments>http://www.procata.com/blog/archives/2005/10/02/backward-compatibilty-and-web-host-adoption-of-php-5/#comments</comments>
		<pubDate>Mon, 03 Oct 2005 03:34:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[compatibility-testing]]></category>
		<category><![CDATA[php-6]]></category>
		<category><![CDATA[php-bugs]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=143</guid>
		<description><![CDATA[I blogged about PHP 5 adoption in january when a survey put the adoption rate at 1.5%.  I ran across a thread at web hosting talk, which asks Php5 rare, why?  Bugs, backward compatibility problems, and the difficulty of running two versions at once come up as issues.
But I want to focus on [...]]]></description>
			<content:encoded><![CDATA[<p>I blogged about <a href="http://www.procata.com/blog/archives/2005/01/20/php-5-adoption/">PHP 5 adoption</a> in january when a survey put the adoption rate at 1.5%.  I ran across a thread at web hosting talk, which asks <a href="http://www.webhostingtalk.com/showthread.php?s=&#038;threadid=447762">Php5 rare, why?</a>  Bugs, backward compatibility problems, and the difficulty of running two versions at once come up as issues.</p>
<p>But I want to focus on backward compatibility problems.  It looks like 5.1 is going to introduce some more backward compatibility issues.  There have been several reports on the WACT mailing list that WACT doesn&#8217;t work under 5.1rc1.  We traced it down to this statement:<br />
<pre class="php">&nbsp;
<span style="color: #0000ff;">$x</span> =&amp; <span style="color: #0000ff;">$this</span>;
&nbsp;</pre><br />
Which results in &#8220;Fatal error: Cannot re-assign $this&#8221; under 5.1rc.  (its fine in 4.x and 5.0)</p>
<p>Pavel from <a href="http://limb-project.com/">LIMB</a> reported this as a <a href="http://bugs.php.net/bug.php?id=34358">bug</a>, which was marked bogus.  Later on, jayboots at sitepoint discovered that assigning to a instance variable instead of a local variable is allowed and offers a workaround:<br />
<pre class="php">&nbsp;
<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">x</span> =&amp; <span style="color: #0000ff;">$this</span>;
<span style="color: #0000ff;">$x</span> =&amp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">x</span>;
&nbsp;</pre></p>
<p>In a <a href="http://www.sitepoint.com/forums/showthread.php?t=296713">sitepoint thread</a> about this issue, stereo frog adds: </p>
<blockquote><p>
They have a code in zend_compile.c that handles &#8220;$this=$x&#8221; and copy-pasted that code in the function that comples assignment by reference. This should prevent &#8220;$this=&#038;$x&#8221; (which is wrong), but for some reason it &#8220;prevents&#8221; &#8220;$x=&#038;$this&#8221; as well (which is absolutely correct).</p></blockquote>
<p>I&#8217;m speculating that any type of intermediary would offer a work around.  For example:<br />
<pre class="php">&nbsp;
<span style="color: #0000ff;">$temp</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'indirect'</span> =&gt; &amp;<span style="color: #0000ff;">$this</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$x</span> =&amp; <span style="color: #0000ff;">$temp</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'indirect'</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;</pre></p>
<p>I tried to verify this tonight, but I could not get 5.1rc to compile on my machine and I&#8217;ve run out of time to deal with that.</p>
<p>Two weeks ago, I tried to email the internals list to see if I could get an explanation, trying to determine if there was a valid reason for preventing $x =&#038; $this, or if the bug was marked bogus by mistake.  Unfortunately, I received no reply.  <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I&#8217;m afraid that there are probably other BC breaks in 5.1.  (Otherwise, its looking like a very nice release.)</p>
<p>Even more promising was some of the preliminary discussion around PHP 6.0.  </p>
<p>In one web hosting forum that I visit, I was surprised to see how popular eAccellerator was for web hosts.  There was discussion in a PHP 6.0 wishlist about possibly including a bytecode cache as standard issue.  One benefit that I see to doing that is that is would act as a &#8220;get out of backward-compatibility jail free card.&#8221;  The web hosts would probably be willing to slog through more BC issues if they had the direct payoff of a byte code cache. (Or force their customers to slog through them.)  Perhaps we might see alot of web hosts move directly from php 4 to php 6?</p>
<p>After a byte-code cache, there is exactly one more &#8220;get out of BC jail free card&#8221; in the deck.  That is a JIT compiler.  On, that note, I&#8217;ll end with <a href="http://www-128.ibm.com/developerworks/java/library/j-jtp09275.html">Java theory and practice: Urban performance legends, revisited</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/10/02/backward-compatibilty-and-web-host-adoption-of-php-5/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
