<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Alternatives of PHP ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Isaiah</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-740238</link>
		<dc:creator>Isaiah</dc:creator>
		<pubDate>Fri, 26 Mar 2010 17:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-740238</guid>
		<description>Have you tried Euphoria? I&#039;ve been looking into it for sometime. I just can&#039;t stand php anymore, it&#039;s slow, messy, and hard to develop. From what I understand it&#039;s easy to install, just put the interpreter in cgi-bin as it&#039;s written in c. From a benchmark I found it&#039;s apparently 35x faster than perl and 31 times faster the python. http://www.rapideuphoria.com/bench.txt
It has an ODBC library allowing it to connect to MySQL http://www.usingeuphoria.com/?page=bestofeu

I see also it has an euphoria to c translator that makes it 3.7 times faster. 
I think I&#039;m going to download it and play around with it, I&#039;ll let you know what I think</description>
		<content:encoded><![CDATA[<p>Have you tried Euphoria? I&#8217;ve been looking into it for sometime. I just can&#8217;t stand php anymore, it&#8217;s slow, messy, and hard to develop. From what I understand it&#8217;s easy to install, just put the interpreter in cgi-bin as it&#8217;s written in c. From a benchmark I found it&#8217;s apparently 35x faster than perl and 31 times faster the python. <a href="http://www.rapideuphoria.com/bench.txt" rel="nofollow">http://www.rapideuphoria.com/bench.txt</a><br />
It has an ODBC library allowing it to connect to MySQL <a href="http://www.usingeuphoria.com/?page=bestofeu" rel="nofollow">http://www.usingeuphoria.com/?page=bestofeu</a></p>
<p>I see also it has an euphoria to c translator that makes it 3.7 times faster.<br />
I think I&#8217;m going to download it and play around with it, I&#8217;ll let you know what I think</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NTDOC</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-19856</link>
		<dc:creator>NTDOC</dc:creator>
		<pubDate>Tue, 05 Dec 2006 09:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-19856</guid>
		<description>@Harry Fuecks

Perl is great but with so many dead links to what were booming sites before is sad.  Perhaps a bad perception on my part but it seems to me that a lot of the open source projects seem to lack the wealth of community support they once had years ago.</description>
		<content:encoded><![CDATA[<p>@Harry Fuecks</p>
<p>Perl is great but with so many dead links to what were booming sites before is sad.  Perhaps a bad perception on my part but it seems to me that a lot of the open source projects seem to lack the wealth of community support they once had years ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rene L.</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2715</link>
		<dc:creator>Rene L.</dc:creator>
		<pubDate>Fri, 22 Sep 2006 14:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2715</guid>
		<description>Learn how easy it is to use a SAX parser (PEAR::XML_Parser) which allows to quickly process large XML documents without loading it into RAM
http://www.schst.net/index.php?__path=articles.xml-parser</description>
		<content:encoded><![CDATA[<p>Learn how easy it is to use a SAX parser (PEAR::XML_Parser) which allows to quickly process large XML documents without loading it into RAM<br />
<a href="http://www.schst.net/index.php?__path=articles.xml-parser" rel="nofollow">http://www.schst.net/index.php?__path=articles.xml-parser</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2574</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 16 Sep 2006 06:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2574</guid>
		<description>C# has the MySql Connector/NET and is reasonably fast and predictable. The Mono project has a page on the topic with a quick example - http://mono-project.com/MySQL there is also the native System.Xml classes for handling Xml internally.</description>
		<content:encoded><![CDATA[<p>C# has the MySql Connector/NET and is reasonably fast and predictable. The Mono project has a page on the topic with a quick example &#8211; <a href="http://mono-project.com/MySQL" rel="nofollow">http://mono-project.com/MySQL</a> there is also the native System.Xml classes for handling Xml internally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2496</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 14 Sep 2006 16:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2496</guid>
		<description>Harry, 

No it is not like 1GB XML file, but more like 100 10MB XML Files, which would not be the problem if memory would not be leaked by PHP.</description>
		<content:encoded><![CDATA[<p>Harry, </p>
<p>No it is not like 1GB XML file, but more like 100 10MB XML Files, which would not be the problem if memory would not be leaked by PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2494</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Thu, 14 Sep 2006 15:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2494</guid>
		<description>As it goes PHP isn&#039;t too bad at looping over lists of things, if that&#039;s what you&#039;re doing. But if your XML file is really that big, you&#039;ll have problems no matter what language you use.

Some random thoughts;

Stream the XML - using something like a SAX API (not DOM which loads the entire document)

If you need to do some kind of calculation based on the entire document i.e. you need to see all the data to be able to produce the final result, you might consider storing intermediate values to file. At the far end of this way of thinking is Google&#039;s MapReduce (http://en.wikipedia.org/wiki/MapReduce) - distribute the processing. The livejournal guys have something heading towards a Perl implementation of the same - see links here: http://del.icio.us/harryf/gearman . Another angle would be to consider an MMap based solution - in Perl check out http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html for example

One advantage of Perl is it&#039;s attracted the type of developers that like to solve this kind of problem (unlike PHP). Browse CPAN - Perl&#039;s XML tools a also good. And demand Unicode support (some like Perl have it... other languages don&#039;t) ;)



http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</description>
		<content:encoded><![CDATA[<p>As it goes PHP isn&#8217;t too bad at looping over lists of things, if that&#8217;s what you&#8217;re doing. But if your XML file is really that big, you&#8217;ll have problems no matter what language you use.</p>
<p>Some random thoughts;</p>
<p>Stream the XML &#8211; using something like a SAX API (not DOM which loads the entire document)</p>
<p>If you need to do some kind of calculation based on the entire document i.e. you need to see all the data to be able to produce the final result, you might consider storing intermediate values to file. At the far end of this way of thinking is Google&#8217;s MapReduce (<a href="http://en.wikipedia.org/wiki/MapReduce" rel="nofollow">http://en.wikipedia.org/wiki/MapReduce</a>) &#8211; distribute the processing. The livejournal guys have something heading towards a Perl implementation of the same &#8211; see links here: <a href="http://del.icio.us/harryf/gearman" rel="nofollow">http://del.icio.us/harryf/gearman</a> . Another angle would be to consider an MMap based solution &#8211; in Perl check out <a href="http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html" rel="nofollow">http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</a> for example</p>
<p>One advantage of Perl is it&#8217;s attracted the type of developers that like to solve this kind of problem (unlike PHP). Browse CPAN &#8211; Perl&#8217;s XML tools a also good. And demand Unicode support (some like Perl have it&#8230; other languages don&#8217;t) <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html" rel="nofollow">http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2402</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 11 Sep 2006 13:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2402</guid>
		<description>It is actually pretty interesting.  Even in Web applications you need to write some scripts every so often - when you do some database structure changes, data loading, removing old data etc. 

Using other language may mean you will have to duplicate certain portion of application functionality, leading to problems with maintainence.</description>
		<content:encoded><![CDATA[<p>It is actually pretty interesting.  Even in Web applications you need to write some scripts every so often &#8211; when you do some database structure changes, data loading, removing old data etc. </p>
<p>Using other language may mean you will have to duplicate certain portion of application functionality, leading to problems with maintainence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stepz</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2401</link>
		<dc:creator>stepz</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2401</guid>
		<description>If you change your mind and still want to use your PHP expertise, then XMLReader is really nice for huge XML -&gt; database transformations. If you don&#039;t need to do complicated processing of the data then it&#039;s quite nice and if you take care to avoid circular references (not that hard with the XMLReader processing model), doesn&#039;t leak memory. I haven&#039;t had the &quot;pleasure&quot; of working with gigabyte sized XML files, but hundreds of MB&#039;s aren&#039;t a problem. As I have 6 years of experience using PHP, the development goes really fast too. Not that Python, et al are bad for this kind of thing, but experience really counts towards development time.</description>
		<content:encoded><![CDATA[<p>If you change your mind and still want to use your PHP expertise, then XMLReader is really nice for huge XML -&gt; database transformations. If you don&#8217;t need to do complicated processing of the data then it&#8217;s quite nice and if you take care to avoid circular references (not that hard with the XMLReader processing model), doesn&#8217;t leak memory. I haven&#8217;t had the &#8220;pleasure&#8221; of working with gigabyte sized XML files, but hundreds of MB&#8217;s aren&#8217;t a problem. As I have 6 years of experience using PHP, the development goes really fast too. Not that Python, et al are bad for this kind of thing, but experience really counts towards development time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beat Vontobel</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2400</link>
		<dc:creator>Beat Vontobel</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2400</guid>
		<description>Possible memory leaks were exactly the reason why I never used PHP for anything else but short running scripts (like web apps). As soon as I got the task to write some long running daemons in a scripting language for the first time some three years ago, I turned to Perl or even Bash (for simpler stuff), even if I never hit a real problem with memory leaks in PHP before.

But as soon as I started to write the first few lines of the deamon in PHP, I started to get some bad feelings about it (even if it would&#039;ve fit for the task at hand and I was actually almost only using PHP at that time). I just realized that nobody was using PHP for anything that runs longer than a few seconds - and I just didn&#039;t want to be the first one to hit the possible bugs.</description>
		<content:encoded><![CDATA[<p>Possible memory leaks were exactly the reason why I never used PHP for anything else but short running scripts (like web apps). As soon as I got the task to write some long running daemons in a scripting language for the first time some three years ago, I turned to Perl or even Bash (for simpler stuff), even if I never hit a real problem with memory leaks in PHP before.</p>
<p>But as soon as I started to write the first few lines of the deamon in PHP, I started to get some bad feelings about it (even if it would&#8217;ve fit for the task at hand and I was actually almost only using PHP at that time). I just realized that nobody was using PHP for anything that runs longer than a few seconds &#8211; and I just didn&#8217;t want to be the first one to hit the possible bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2399</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2399</guid>
		<description>Hubert, 

I knew something would write about set_error_handler.  Unfortunately it does not work. 

Here is what documentation says:

The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.

Here is little example with problem I&#039;ve mentioned:

&lt;?php

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
  echo(&quot;Error !&quot;);
}

set_error_handler(&quot;myErrorHandler&quot;);

$a=false;

$a-&gt;method();
?&gt;

Error handler does not help in this case.</description>
		<content:encoded><![CDATA[<p>Hubert, </p>
<p>I knew something would write about set_error_handler.  Unfortunately it does not work. </p>
<p>Here is what documentation says:</p>
<p>The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.</p>
<p>Here is little example with problem I&#8217;ve mentioned:</p>
<p>< ?php</p>
<p>function myErrorHandler($errno, $errstr, $errfile, $errline)<br />
{<br />
  echo("Error !");<br />
}</p>
<p>set_error_handler("myErrorHandler");</p>
<p>$a=false;</p>
<p>$a->method();<br />
?></p>
<p>Error handler does not help in this case.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

