<?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: It&#8217;s official: Javascript sucks harder than PHP</title>
	<atom:link href="http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Thu, 04 Dec 2008 03:41:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Pete</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-825587</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Thu, 13 Nov 2008 06:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-825587</guid>
		<description>I am fairly new to web programming, but I would say php is the dogs do da's. Its well suited to working with mysql, very fast, reliable more secure than javascript too. Obvoisly for animations javascript wud be needed, but other than that I wud prefere to use php. Dunno whoever said you cant use php with html and css, maybe they was confused just because its server side. Also php is much more browser friendly such as for hand held devices and screen readers etc...</description>
		<content:encoded><![CDATA[<p>I am fairly new to web programming, but I would say php is the dogs do da&#8217;s. Its well suited to working with mysql, very fast, reliable more secure than javascript too. Obvoisly for animations javascript wud be needed, but other than that I wud prefere to use php. Dunno whoever said you cant use php with html and css, maybe they was confused just because its server side. Also php is much more browser friendly such as for hand held devices and screen readers etc&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-427403</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 27 Oct 2007 09:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-427403</guid>
		<description>Good Lord, please fix those javascript tickers that websites love to use, that my computer hates to be subjected to. Fans and processors overloading until I turn the darn javascript off in the preferences. Then everything returns to cool, quiet, and normal. You really need to address this problem.</description>
		<content:encoded><![CDATA[<p>Good Lord, please fix those javascript tickers that websites love to use, that my computer hates to be subjected to. Fans and processors overloading until I turn the darn javascript off in the preferences. Then everything returns to cool, quiet, and normal. You really need to address this problem.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-218753</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Thu, 05 Apr 2007 17:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-218753</guid>
		<description>Disclaimer: my day job is PHP and JS and I know them in and out in every way.  I honestly think that both JS and PHP suck hardcore as languages and I defend neither one.  However, they have their place.


&lt;blockquote&gt;What are the gripes people have with PHP?&lt;/blockquote&gt;

Where to begin?  (Random order of &lt;em&gt;&lt;strong&gt;my gripes&lt;/strong&gt;&lt;/em&gt; about PHP that I can think of off the top of my head.)


First, you have to escape HTML with &lt;code&gt;&#60;?php&lt;/code&gt; tag.  This not only clouds business logic with display but it &lt;strong&gt;encourages&lt;/strong&gt; mixing them.

Second, PHP's weak typing means you can easily run into issues because the language does not let you declare your intent.  Perl's == vs. eq is in the right direction.

Third, PHP has no namespaces and, my last count a week-or-so ago, has 5,312 functions thanks to all the modules/extensions.

Fourth, PHP has no naming consistency.  strpos vs. str_replace.

Fifth, PHP has no argument order consistency.  &lt;code&gt;in_array($needle, $haystack)&lt;/code&gt; vs. &lt;code&gt;strpos($haystack, $needle)&lt;/code&gt;.

Sixth, unknown tokens are assumed strings.  Consider &lt;code&gt;define("MY_FOO_DEFINE", 10)&lt;/code&gt;.  If you accidentally use &lt;code&gt;MY_FOO_DFEINE&lt;/code&gt; it will assume you want the string "MY_FOO_DFEINE" and continue on.

Seventh, it has forking (pcntl) but absolutely no locking ability.  (I write off-line PHP scripts that utilize my app's classes.)

Eighth, single inheritance on classes.

Ninth, lack of operator overload.

Tenth, references/aliases.  They blow.  Especially prior to, I forget exactly which version, 5.1 where objects were copied which made it insanely tedious to make sure all of your aliasing (adding &#38; everywhere) were done right.  If you miss a single one then you get a copy.  Without pointers and a good debugger, this because nigh impossible to track down.

Eleventh, magic quotes.  They promote laziness.  Glad to see its slated to be removed in PHP6.

Twelfth, no one needs native unicode.  Right?

Thirteenth, PHP has no official spec.  It's just whatever the developers feel like doing and adding (which I assume is the root for naming inconsistency and many other gripes of mine).

Fourteenth, PHP lacks good debugging and profiling support.  I've attempting to use a couple debuggers including Zend's debugger but they all lack or didn't work.  Introduce AJAX into your app and things get worse.

Fifteenth, complete and utter lack of objects for dates, strings, arrays, etc.  No operator overloading exacerbates this.  It would be very helpful to have &lt;code&gt;$arr-&#62;in('foo')&lt;/code&gt; or &lt;code&gt;$date-&#62;incrementDays(7);&lt;/code&gt;.  Heck &lt;code&gt;$file-&#62;write('flooby');&lt;/code&gt; for files would be nice too.

Sixteenth, the arrays make combining lists and hashes into one data type but it becomes a chore if you specifically need one and its respective semantics.

Seventeenth, functions aren't objects which means you can't pass functions around.  Creating an anonymous function with &lt;code&gt;create_function&lt;/code&gt; is a joke and a hack to get around this problem....kind of.

Eighteenth, no late static binding (google it).  Still.

Nineteenth, all of my interactions with the development group have been the opposite of stellar.  The common response is a quick, terse, copy/pastes response and goes something like "that's not a bug, it's a feature."


That's about enough I think.  For what it's worth, I do have a list of things I like about PHP but you didn't ask. :)  In particular is the breadth of database support.  I had trouble finding mysql support for Python and when I did (mysqldb module) I found out that it forces cursors for every query and it breaks when trying to do something (sarcasm) complex like joins.

PHP has its place and I hope it stays there! :)</description>
		<content:encoded><![CDATA[<p>Disclaimer: my day job is PHP and JS and I know them in and out in every way.  I honestly think that both JS and PHP suck hardcore as languages and I defend neither one.  However, they have their place.</p>
<blockquote><p>What are the gripes people have with PHP?</p></blockquote>
<p>Where to begin?  (Random order of <em><strong>my gripes</strong></em> about PHP that I can think of off the top of my head.)</p>
<p>First, you have to escape HTML with <code>&lt;?php</code> tag.  This not only clouds business logic with display but it <strong>encourages</strong> mixing them.</p>
<p>Second, PHP&#8217;s weak typing means you can easily run into issues because the language does not let you declare your intent.  Perl&#8217;s == vs. eq is in the right direction.</p>
<p>Third, PHP has no namespaces and, my last count a week-or-so ago, has 5,312 functions thanks to all the modules/extensions.</p>
<p>Fourth, PHP has no naming consistency.  strpos vs. str_replace.</p>
<p>Fifth, PHP has no argument order consistency.  <code>in_array($needle, $haystack)</code> vs. <code>strpos($haystack, $needle)</code>.</p>
<p>Sixth, unknown tokens are assumed strings.  Consider <code>define("MY_FOO_DEFINE", 10)</code>.  If you accidentally use <code>MY_FOO_DFEINE</code> it will assume you want the string &#8220;MY_FOO_DFEINE&#8221; and continue on.</p>
<p>Seventh, it has forking (pcntl) but absolutely no locking ability.  (I write off-line PHP scripts that utilize my app&#8217;s classes.)</p>
<p>Eighth, single inheritance on classes.</p>
<p>Ninth, lack of operator overload.</p>
<p>Tenth, references/aliases.  They blow.  Especially prior to, I forget exactly which version, 5.1 where objects were copied which made it insanely tedious to make sure all of your aliasing (adding &amp; everywhere) were done right.  If you miss a single one then you get a copy.  Without pointers and a good debugger, this because nigh impossible to track down.</p>
<p>Eleventh, magic quotes.  They promote laziness.  Glad to see its slated to be removed in PHP6.</p>
<p>Twelfth, no one needs native unicode.  Right?</p>
<p>Thirteenth, PHP has no official spec.  It&#8217;s just whatever the developers feel like doing and adding (which I assume is the root for naming inconsistency and many other gripes of mine).</p>
<p>Fourteenth, PHP lacks good debugging and profiling support.  I&#8217;ve attempting to use a couple debuggers including Zend&#8217;s debugger but they all lack or didn&#8217;t work.  Introduce AJAX into your app and things get worse.</p>
<p>Fifteenth, complete and utter lack of objects for dates, strings, arrays, etc.  No operator overloading exacerbates this.  It would be very helpful to have <code>$arr-&gt;in('foo')</code> or <code>$date-&gt;incrementDays(7);</code>.  Heck <code>$file-&gt;write('flooby');</code> for files would be nice too.</p>
<p>Sixteenth, the arrays make combining lists and hashes into one data type but it becomes a chore if you specifically need one and its respective semantics.</p>
<p>Seventeenth, functions aren&#8217;t objects which means you can&#8217;t pass functions around.  Creating an anonymous function with <code>create_function</code> is a joke and a hack to get around this problem&#8230;.kind of.</p>
<p>Eighteenth, no late static binding (google it).  Still.</p>
<p>Nineteenth, all of my interactions with the development group have been the opposite of stellar.  The common response is a quick, terse, copy/pastes response and goes something like &#8220;that&#8217;s not a bug, it&#8217;s a feature.&#8221;</p>
<p>That&#8217;s about enough I think.  For what it&#8217;s worth, I do have a list of things I like about PHP but you didn&#8217;t ask. :)  In particular is the breadth of database support.  I had trouble finding mysql support for Python and when I did (mysqldb module) I found out that it forces cursors for every query and it breaks when trying to do something (sarcasm) complex like joins.</p>
<p>PHP has its place and I hope it stays there! :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-187796</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Sat, 24 Feb 2007 07:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-187796</guid>
		<description>I'm not intending to be argumentative - just want to hear some opinions.  What are the gripes people have with PHP?  You can be quick and lazy, or super structured.  You can make your scripts object oriented, or choose not too.  Just about everything concerning form is entirely up to the designer.  And the API is pretty great.

The only potential disadvantage I can think of is the fact that variables don't have to be declared, causing a larger chance of semantic errors (variable typos that aren't caught).  But then again you can make PHP catch this stuff on almost any server configuration.  So what are the disadvantages you all have?  I'd love to hear input.  Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;m not intending to be argumentative - just want to hear some opinions.  What are the gripes people have with PHP?  You can be quick and lazy, or super structured.  You can make your scripts object oriented, or choose not too.  Just about everything concerning form is entirely up to the designer.  And the API is pretty great.</p>
<p>The only potential disadvantage I can think of is the fact that variables don&#8217;t have to be declared, causing a larger chance of semantic errors (variable typos that aren&#8217;t caught).  But then again you can make PHP catch this stuff on almost any server configuration.  So what are the disadvantages you all have?  I&#8217;d love to hear input.  Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: bumbescu</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-168831</link>
		<dc:creator>bumbescu</dc:creator>
		<pubDate>Thu, 01 Feb 2007 07:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-168831</guid>
		<description>I'm using php / mysql to store over 15.000 articles and it works better togheder.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using php / mysql to store over 15.000 articles and it works better togheder.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Ries</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-162660</link>
		<dc:creator>Alex Ries</dc:creator>
		<pubDate>Thu, 25 Jan 2007 12:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-162660</guid>
		<description>Nice way to compare stuff that you can't really compare hehe. Anyway the more I have worked with real programming languages for webdevelopment --Java in the form of JSP and c# in the form of ASP (.net ofcourse)--, and the more PHP is becoming a two faced monster with their somewhat (excuse the phrase) half-arsed implementation of object oriented programming --a good example would be the whole type-hinting facade-- the more I tend to go towards jsp and asp...

I used to be a fanatic PHP scripter even though I did plenty of programming in other languages (not for web purposes) and sure it's alot easier than anything out there, just due to the un-intuitive (to me) implementation of OO in php 5 there isn't really any IDE that actually knows what to do with those objects that just 'somehow' arrive in your included php files.

javascript is finally advancing into something real and not a could-have-been language. A few years ago noone wanted to even really touch javascript --mostly due to microsoft's implementation of jscript. Now with the AJAX-hype things have been looking up though.</description>
		<content:encoded><![CDATA[<p>Nice way to compare stuff that you can&#8217;t really compare hehe. Anyway the more I have worked with real programming languages for webdevelopment &#8211;Java in the form of JSP and c# in the form of ASP (.net ofcourse)&#8211;, and the more PHP is becoming a two faced monster with their somewhat (excuse the phrase) half-arsed implementation of object oriented programming &#8211;a good example would be the whole type-hinting facade&#8211; the more I tend to go towards jsp and asp&#8230;</p>
<p>I used to be a fanatic PHP scripter even though I did plenty of programming in other languages (not for web purposes) and sure it&#8217;s alot easier than anything out there, just due to the un-intuitive (to me) implementation of OO in php 5 there isn&#8217;t really any IDE that actually knows what to do with those objects that just &#8217;somehow&#8217; arrive in your included php files.</p>
<p>javascript is finally advancing into something real and not a could-have-been language. A few years ago noone wanted to even really touch javascript &#8211;mostly due to microsoft&#8217;s implementation of jscript. Now with the AJAX-hype things have been looking up though.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: macosbrain</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-104071</link>
		<dc:creator>macosbrain</dc:creator>
		<pubDate>Thu, 23 Nov 2006 19:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-104071</guid>
		<description>i know this for years. that is the real evidence. thank you :-)</description>
		<content:encoded><![CDATA[<p>i know this for years. that is the real evidence. thank you :-)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mathachew</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-77764</link>
		<dc:creator>Mathachew</dc:creator>
		<pubDate>Thu, 02 Nov 2006 00:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-77764</guid>
		<description>They're both good languages. Period.</description>
		<content:encoded><![CDATA[<p>They&#8217;re both good languages. Period.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: stu</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-74088</link>
		<dc:creator>stu</dc:creator>
		<pubDate>Wed, 25 Oct 2006 18:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-74088</guid>
		<description>considering JS is a functional language and so much more powerful compared to php...</description>
		<content:encoded><![CDATA[<p>considering JS is a functional language and so much more powerful compared to php&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: olaf2</title>
		<link>http://www.sitepoint.com/blogs/2006/10/11/its-official-javascript-sucks-harder-than-php/#comment-72995</link>
		<dc:creator>olaf2</dc:creator>
		<pubDate>Tue, 24 Oct 2006 05:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1736#comment-72995</guid>
		<description>@martin2001

this is not the place for that kind of questions (you will never get an answer, perhaps).

Try the support forums here at sitepoint or somwhere, if you're looking for php tutorials search google for "PHP beginner tutorials".</description>
		<content:encoded><![CDATA[<p>@martin2001</p>
<p>this is not the place for that kind of questions (you will never get an answer, perhaps).</p>
<p>Try the support forums here at sitepoint or somwhere, if you&#8217;re looking for php tutorials search google for &#8220;PHP beginner tutorials&#8221;.</p>]]></content:encoded>
	</item>
</channel>
</rss>
