<?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>PHP vs .Net &#187; PHP</title>
	<atom:link href="http://www.phpvs.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpvs.net</link>
	<description>ASP.Net and PHP go head to head</description>
	<lastBuildDate>Sat, 24 Dec 2011 18:20:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Build a CentOS LAMP server</title>
		<link>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/</link>
		<comments>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 21:45:14 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/</guid>
		<description><![CDATA[I finally finished re-building a development CentOS LAMP server. More importantly, and the primary purpose of the whole exercise, is that I finished my guide to building a CentOS LAMP server. I am happy to now post said guide on this blog (under Articles), for everyone to read and abuse as they please! So here [...]]]></description>
			<content:encoded><![CDATA[<p>I finally finished re-building a development CentOS LAMP server.  More importantly, and the primary purpose of the whole exercise, is that I finished my <i>guide</i> to building a CentOS LAMP server. I am happy to now post said guide on this blog (under Articles), for everyone to read and abuse as they please!</p>
<p>So here you go&#8230; may I present Blake&#039;s CentOS LAMP Server Guide, <a href="http://www.phpvs.net/articles/blakes-centos-lamp-server-guide-single-page/">single-page edition</a>, and the perhaps friendlier <a href="http://www.phpvs.net/articles/blakes-centos-lamp-server-guide/">multi-page edition</a>.</p>
<p>The guide covers the basics of building up a CentOS box to use as a remotely-administered LAMP server, including installation and configuration of PHP, Apache and MySQL.  Other goodies are in there too, like mail server setup with Postfix/Postgrey/Dovecot.  Keep in mind this guide was written from my point of view, and contains the ways that <em>I</em> like to do things.  I keep my basic LAMP stuff pretty slim for maximum performance, so you&#039;ll see some installations from source in there to help keep things tight.</p>
<p>Let me know if the guide is useful!  I&#039;m hoping to get Google to pick it up and get some comments going on the various ways people set up their own LAMP boxes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 &#8211; Namespaces and Late Static Binding</title>
		<link>http://www.phpvs.net/2008/02/14/php-53-namespaces-and-late-static-binding/</link>
		<comments>http://www.phpvs.net/2008/02/14/php-53-namespaces-and-late-static-binding/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 00:50:44 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[Object Oriented Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/02/14/php-53-namespaces-and-late-static-binding/</guid>
		<description><![CDATA[Work on the Mono machine continues. For reasons as yet undisclosed, I&#039;m rebuilding the Mono test box from scratch. I&#039;m not expecting this to resolve the previous issues I experienced while benchmarking Mono, but it is allowing me to tie up some loose ends. More on that soon. In the meantime, I noticed a new [...]]]></description>
			<content:encoded><![CDATA[<p>Work on the Mono machine continues.  For reasons as yet undisclosed, I&#039;m rebuilding the Mono test box from scratch.  I&#039;m not expecting this to resolve the <a href="http://www.phpvs.net/2008/02/08/benchmarking-mono-aspnet-vs-php-a-slight-problem/">previous issues</a> I experienced while benchmarking Mono, but it is allowing me to tie up some loose ends.  More on that soon.</p>
<p>In the meantime, I noticed a <a href="http://www.sitepoint.com/article/whats-new-php-5-3" target="_new">new article</a> over at Sitepoint about the upcoming PHP 5.3 release, slated for later this year.  Apparently some new features which were originally scheduled for PHP 6 are now included in 5.3, including Late Static Binding, and Namespaces!</p>
<p>While I can&#039;t get too excited about Namespaces, I know there are people out there that will love the fact that they will finally be arriving to PHP-land.  By its very nature a lot of PHP projects are small, and you can usually get along fine without Namespaces on a small project.  But with larger PHP sites and applications like Facebook becoming more commonplace, Namespaces are bound to come in exceedingly useful for some people.</p>
<p>On a more personal-project level, I find Late Static Binding to be much more exciting.  The examples given in the Sitepoint article are very thorough so I won&#039;t reprint them here, but the quick summary is that if you have a function in a Parent class that uses the <code>self::</code> operator, you can&#039;t call that function from the perspective of a Child class, as <code>self::</code> always references the class it is in (ie. the Parent).  Late Static Binding will give PHP developers a new reference called <code>static::</code> which changes that; it will resolve to the static class at runtime (ie. the Child).  This will allow for a much more intuitive extensions of parent classes in object-oriented PHP!</p>
<p>Good stuff, you should check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/02/14/php-53-namespaces-and-late-static-binding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reasons Why You Shouldn&#039;t Write Things Like &quot;Top Ten Reasons Why PHP is Better Than ASP&quot;</title>
		<link>http://www.phpvs.net/2008/01/30/reasons-why-you-shouldnt-write-things-like-top-ten-reasons-why-php-is-better-than-asp/</link>
		<comments>http://www.phpvs.net/2008/01/30/reasons-why-you-shouldnt-write-things-like-top-ten-reasons-why-php-is-better-than-asp/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 01:30:57 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Classic ASP]]></category>
		<category><![CDATA[flamebait]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/01/30/reasons-why-you-shouldnt-write-things-like-top-ten-reasons-why-php-is-better-than-asp/</guid>
		<description><![CDATA[Morgan was trolling newsgroups the other day when he stumbled across a fun flamewar going on in microsoft.public.dotnet.framework.aspnet. Someone started a topic based on an old blog post entitled &#034;Why PHP is better than ASP&#034;. If you read the ensuing thread on the newsgroup, you&#039;ll discover why I never read newsgroups. It&#039;s like sawing off [...]]]></description>
			<content:encoded><![CDATA[<p>Morgan was trolling newsgroups the other day when he stumbled across a fun flamewar going on in microsoft.public.dotnet.framework.aspnet.  Someone <a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/61e0da81306c8ca6?hl=en" target="_new">started a topic</a> based on an old blog post entitled &#034;Why PHP is better than ASP&#034;.  If you read the ensuing thread on the newsgroup, you&#039;ll discover why I never read newsgroups.  It&#039;s like sawing off the top of your head using a dremel and putting rabid Portugese Man-o-wars on your brain before arc-welding your skull back together.  I&#039;m pretty sure that jellyfish can&#039;t get rabies, but it makes my analogy more accurate.</p>
<p>Dubious literary merits of top-ten lists aside, I thought I&#039;d re-post the list here.  Then I thought I&#039;d make fun of it and finish with a life lesson about how cheerleading for a technology is rarely worth the effort, unless you&#039;re getting personal kickbacks.</p>
<blockquote><p> 10 Reasons Why PHP is better than ASP</p>
<p>1. PHP.NET the greatest API resource known to MAN<br />
2. If you have a problem, someone will have already implemented a solution in PHP for you<br />
3. Syntax is better, closer to C, C++, and Java. Unlike VB where anything goes.<br />
4. To run ASP you need IIS on windows, which is not free, for PHP however you need linux and apache which are FREE!!<br />
5. Great built in support for ftp, email, graphics package GD2 and also MySQL (also FREE).<br />
6. PHP will run on Unix, Linux, Solaris and Windows. ASP is mainly only Windows associated but you can use it on linux with additional modules installed.<br />
7. PHP code is much faster, ASP is developed on the COM based architecture, this is an overhead for the server.<br />
8. mod_rewrite, need I say more.<br />
9. Advanced Perl-compatible regular expression functions and loads of built in support for regular expressions on the whole.<br />
10. Greater control over error handling, and more detailed error messages.</p></blockquote>
<p>My god!  It&#039;s full of assumptions with no real data backing the arguments whatsoever!  I am absoultely SHOCKED to find something like that on the internet!</p>
<p>Sarcasm aside, I think the author was just trying to say how happy he was with PHP.  I can&#039;t fault him for that.  Letterman has shown us that sometimes you have to really stretch to fill out a top ten list too, so I&#039;ll cut him some slack there.  He probably just wrote down a bunch of stuff that his overall PHP programming environment did better than his old ASP one.   But if you&#039;re going to promote something <em>at the expense of something else</em>, you should try to have your arguments straight.  So let&#039;s burn it down:</p>
<blockquote><p>1. PHP.NET the greatest API resource known to MAN</p></blockquote>
<p>I like the php.net site as much as the next PHP programmer, but I&#039;m going to go with Kip here and say, &#034;Nobody can know that, Napoleon.&#034;  I&#039;ll agree that the PHP site offers much better reference than anything I can find for classic ASP, but it&#039;s a bit of hyperbole to say it&#039;s the greatest API resource ever.  It&#039;s a decent point, and I award honors for enthusiasm, but it&#039;s not really a concrete reason as to why the PHP language is better than the ASP language.</p>
<blockquote><p>2. If you have a problem, someone will have already implemented a solution in PHP for you</p></blockquote>
<p>That&#039;s not a reason why PHP is better than ASP.  That might be a reason why the PHP community is better than the ASP community, but it says nothing for the language itself.  All this can tell us is that there are likely more PHP users than ASP users.  By this logic, C and C++ are &#039;better&#039; than PHP.</p>
<blockquote><p>3. Syntax is better, closer to C, C++, and Java. Unlike VB where anything goes.</p></blockquote>
<p>Half-point for this one.  If we&#039;re talking classic ASP, PHP is certainly more palatable, at least to me.  But syntax is a subjective topic (which is why some people still use Perl.  Hah!  Low blow.)  PHP isn&#039;t a walk in the park either though.  One of PHP&#039;s downsides is that the core functions were put together a bit willy-nilly (some string function start with &#034;str_&#034;, while some are just &#034;str&#034;), so often a programmer has to go to the documentation just to find out a function name.  And keep in mind that at the time classic ASP was being compared to PHP, it was <em>PHP 3</em> that most people were using.  Go back to that baby and find out just how much better the newer PHP versions are!</p>
<blockquote><p> 4. To run ASP you need IIS on windows, which is not free, for PHP however you need linux and apache which are FREE!!</p></blockquote>
<p>A for effort, D for results.  If you were really using classic ASP without using Windows (IIS is free with Windows), then how about <a href="http://www.apache-asp.org/" target="_new">Apache::ASP</a>?  It&#039;s been around since 1998, eight years before this guy&#039;s post.  This would be an argument for the cost-effectiveness of a language, not for how good the language is.</p>
<blockquote><p>5. Great built in support for ftp, email, graphics package GD2 and also MySQL (also FREE).</p></blockquote>
<p>I agree with this.  PHP comes with a much better set of default functionality than classic ASP.</p>
<blockquote><p>6. PHP will run on Unix, Linux, Solaris and Windows. ASP is mainly only Windows associated but you can use it on linux with additional modules installed.</p></blockquote>
<p>I can only offer a rebuttal here from the point of view where both PHP and ASP are being used to serve web pages, and in this case his point isn&#039;t a real argument.  To serve PHP web pages, you need to install <em>a PHP module for your web server</em> (the typical install), or a web server that handles PHP natively (none exist that I&#039;m aware of).  To serve ASP web pages, you need to install <em>an ASP module for your web server</em> (Apache::ASP), or a web server that handles it natively (IIS, <strike>UltiDev Cassini</strike>*). It&#039;s the same thing in either case:  you have to install or modify a web server to serve pages for your chosen language.  This is really a platform consideration, not a language consideration.  You can&#039;t make this comparison for standalone PHP (such as the CLI) either&#8230; it would be like saying C is better than PHP because I can make desktop apps with C.  You&#039;re comparing different tools in that case.</p>
<blockquote><p>7. PHP code is much faster, ASP is developed on the COM based architecture, this is an overhead for the server.</p></blockquote>
<p>Likely, but debatable.  PHP is an interpreted language, which means that your web server has to load in the interpreter and all the required libraries each time it uses PHP.  Just like a web server would have to load in the COM libraries each time it wanted to serve some ASP.  So&#8230; got any benchmarks?  Because my dad is faster than your dad.</p>
<blockquote><p>8. mod_rewrite, need I say more.</p></blockquote>
<p>This is a junk point and quite irrelevant.  mod_rewrite is a feature of Apache, not PHP.  If you don&#039;t like the features of IIS, use something else.  Did I mention Apache::ASP yet?</p>
<blockquote><p>9. Advanced Perl-compatible regular expression functions and loads of built in support for regular expressions on the whole.</p></blockquote>
<p>Huh?  I admit, I&#039;ve never done any classic ASP regexp work, but a simple Google search resulted in <a href="http://www.ilovejackdaniels.com/asp/vbscript-regular-expressions/" target="_new">this article on VBScript regexps</a>.  Looks pretty much like the standard &#034;advanced&#034; Perl regexps to me.  I can get behind the &#034;built-in support&#034; aspect of the comment, as it looks like you might have had to write your own ereg_replace-style functions, but it doesn&#039;t look like ASP is lacking anything in the regexp-engine department.</p>
<blockquote><p>10. Greater control over error handling, and more detailed error messages.</p></blockquote>
<p>Disagree.  PHP didn&#039;t get decent error handling until PHP 5, by which time classic ASP had been replaced by ASP.NET, so you&#039;d want to compare those instead.  Building an error-handling structure in PHP back then would have been about the same amount of effort as building one for a classic ASP application.</p>
<p><strong>So, in summary, newsgroup arguments suck</strong>.  Why would someone post a year-old argument about to a newsgroup that&#039;s not even on topic (classic ASP is not ASP.NET)?  Whatever the reason, the resulting flamewar on the newsgroup is proof for one of my favourite sayings:  &#034;Think of just how stupid the everyday median person is&#8230; and then realize that half of them are stupider than that.&#034;  Average newsgroup poster&#039;s intellect aside, cheerleading PHP in this kind of way generally just leads to all the nay-sayers pointing out how crappy most of the PHP code out there is, and PHP is still fighting this kind of image.  If you were writing a professional application, some of these points might be useful in an overall comparison of system architectures, but as far as distinct language differences go it&#039;s a pretty fluffy list.</p>
<p>PHP is my favourite language.  I personally would never use classic ASP over PHP for a web project, but that&#039;s not because of any significant language difference, claimed or real.  None of the points in this guys list <em>prove</em> anything about either language, and are really just unsubstantiated ponderings on his own personal experience.  That&#039;s fine, as long as you don&#039;t draw any conclusive results from it!  I&#039;m sure the guy just wanted to express his new-found satisfaction and personal appreciation for PHP in a catchy form, which is great.  Have hammer, everything looks like nail, etc.  However, judging by the ridiculous newsgroup activity, the author would have been much better off writing something like &#034;I like PHP better than classic ASP because setting up a complex search-engine friendly PHP application using Apache and mod_rewrite is easier and more cost-effective than setting up a similar ASP application using IIS&#034;.  His points would support that statement much better, and I would agree with him wholeheartedly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/01/30/reasons-why-you-shouldnt-write-things-like-top-ten-reasons-why-php-is-better-than-asp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Welcome!</title>
		<link>http://www.phpvs.net/2008/01/11/welcome/</link>
		<comments>http://www.phpvs.net/2008/01/11/welcome/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 05:14:18 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[magic quotes]]></category>
		<category><![CDATA[PHP 5]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/01/11/welcome/</guid>
		<description><![CDATA[Welcome to the blog! I&#039;m the PHP guy. I&#039;m excited to be collaborating on this with my brother, as all of my witty jabs and jests can now be recorded for a public audience, enhancing their finely-honed humiliating edges to deliver zesty slashes of ridicule! So as it&#039;s a new year, and this is a [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the blog!  I&#039;m the PHP guy.  I&#039;m excited to be collaborating on this with my brother, as all of my witty jabs and jests can now be recorded for a public audience, enhancing their finely-honed humiliating edges to deliver zesty slashes of ridicule!</p>
<p>So as it&#039;s a new year, and this is a new blog, it&#039;s totally inappropriate that I start things off with a death announcement.  In case you hadn&#039;t heard, PHP 4 is done, finished, kaput.  And thank Zeus!  Only one more major version to go until Magic Quotes are but a painful memory.  Don&#039;t get me wrong&#8230; PHP 4 has kept me employed in various ventures over the last 7 years, but Magic Quotes are a pain in the ass if you don&#039;t know what you&#039;re doing, and I sure didn&#039;t for a long time.  Seven years&#8230; oh, the memories.  I remember the first PHP app I worked on, years ago, in the glorious dot-com summer days of 2001.  It was a bulletin board (dare I name it? yes, of course) called vBulletin, and the damn thing didn&#039;t even have any indexes on its MySQL tables when I was tasked with fixing a particular installation at the little start-up I worked for at the time.</p>
<p>Anyhow, the PHP folk&#039;ll be dragging out security releases until the end of August &#039;08, and after that you&#039;ll need to have your apps in shape.  Check out the <a href="http://ca3.php.net/manual/en/migration5.php" title="PHP 5 migration guide" target="_blank">migration guide</a>.  There&#039;s so many compelling reasons to upgrade to PHP 5 that I won&#039;t even get into it here.  The upgrade process is generally pretty painless, unless you happen to work at my current job where someone decided to change $this to a null reference in some of the key application classes.</p>
<p>Even though I&#039;m the PHP guy of this two-bit operation, keep in mind that I actually like .Net, especially for non-web application programming, of which I&#039;ve done practically none.  One time I thought I might be applying for a .Net job though, so I started a small non-web project to get my hands dirty.  I didn&#039;t get very far, but I did end up with a desktop app that did a good job of displaying a picture of a rather awesome <a href="http://grza.net/GIS/Baby%20Seal%20Cold.jpg" title="Cold Baby Seal image" target="_blank">cold baby seal</a>.  However, although I like .Net, I fear change, and I am solidly behind PHP as a web development tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/01/11/welcome/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

