<?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>Rajesh Segu &#187; php</title>
	<atom:link href="http://www.rajeshsegu.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rajeshsegu.com</link>
	<description>Technology and Random</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:04:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Compiled PHP Applications</title>
		<link>http://www.rajeshsegu.com/2008/04/compiled-php-applications/</link>
		<comments>http://www.rajeshsegu.com/2008/04/compiled-php-applications/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 21:29:21 +0000</pubDate>
		<dc:creator>rajeshsegu</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.rajeshsegu.com/?p=12</guid>
		<description><![CDATA[As the Web has evolved, it has changed from a collection of static pages to an environment filled with randomly and dynamically changing content. In producing dynamic content among all the web technologies PHP has been the most developer-friendly programming language. PHP generally runs in a web-server taking PHP code as its input and creating [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">As the Web has evolved, it has changed from a collection of static pages to an environment filled with randomly and dynamically changing content. In producing dynamic content among all the web technologies PHP has been the most developer-friendly programming language. PHP generally runs in a web-server taking PHP code as its input and creating dynamic html pages as output.</p>
<p style="text-align: justify;">PHP like many other web technologies is an interpreted language.  When a web page is requested from the web server, the php code associated to the page is interpreted and executed on a fly and as a result dynamic html is produced. For every php web request a new process is forked and that process takes care of interpreting the language which is called process based execution. As a fact forking a process is a very costly system operation and as the load on the server increases the time of execution and memory becomes inverse. In addition to this interpretation of the language also consumes some time. For a web application with millions of page views all the above operations can make the web server unresponsive/crash.</p>
<p style="text-align: justify;">To solve one part of the latency, i.e., interpretation, we could make use of PHP compiler. PHP Compiler compiles a PHP web page into its corresponding DLL. DLL is nothing more than a C executable file. Anytime , there is only one instance of the DLL loaded in the memory while different resources uses just its memory images for execution which would make them more memory efficient. And with this DLL approach we eliminate the interpretation stage of the php life cycle thus saving some latency. In addition to saving latency and better memory management, there are lot more advantages:</p>
<p style="text-align: justify;">1. Does not require a interpreter to be installed or packaged. No need of mod_php in the Apache server.</p>
<p style="text-align: justify;">2. Compile complete source tree in a single executable.</p>
<p style="text-align: justify;">3. Once compiled, irreversable to original PHP code.</p>
<p style="text-align: justify;">4. Embedding the compiled code into a micro web server serves as a offline web application.</p>
<p style="text-align: justify;">5. Creating common libraries can be shared between different applications on the same server.</p>
<p style="text-align: justify;">Since the code is hidden we can easily distribute the code with out worrying about code getting stolen. Packaging online web application into offline web application using a micro web server would be a big win for internet companies.</p>
<p style="text-align: justify;">Note: <a href="http://www.roadsend.com" target="_blank">RoadSend</a> is one such PHP Compiler that could help you with your web application performance.</p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.rajeshsegu.com/2008/04/compiled-php-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
