Good news. Advantages of PHP Over Java

PHP is an established server-side scripting language for creating dynamic Web pages. As a language that has been designed expressly for the Web, it brings many features that commercial entities are looking for:

  • Exceptionally short learning curve
  • Quick development time
  • Very high performance

This is essential for companies who are faced with scarce skilled programming resources and ever-tighter time to market deadlines. In addition, PHP supports all major platforms (UNIX, Windows and even mainframes), and features native support for most popular databases. All these factors make it a very good choice for Web development: such shops working with PHP have reported being able to hire non-programmers and have them producing usable code within days. Programmers familiar with languages such as C, C++ or Java frequently find that they can begin programming in PHP within a few hours.

The fact that PHP was designed specifically for Web development gives it an edge as a development tool, as Intranet Design Magazine explains:

"PHP was built with the needs of Web developers in mind… Unlike other cumbersome, overhead-laden approaches, PHP is lightweight and focused on the Web - where it can solve complex problem scenarios quicker and more easily than comparable technologies."1

Java began its life as a programming language and was initially aimed at running client-side applications inside of Web browsers. Over the last few years, the problems associated with these “applets,” as they were known, has led Sun and many other Java developers to use the language in other ways. One of the most prominent ways is in server-side programming, allowing Web sites to connect to databases and produce other server-side applications, or “servlets.” Sun came out with Java Server Pages (JSP) as a means of writing servlets. JSP, like PHP, is highly portable across different platforms (even though PHP supports any 32-bit or better platform, whereas JSP supports only platforms that have a Java virtual machine available). However, a beginner with no programming background will find it exceptionally difficult to begin working with servlets,because of the complexity of the language as well as the complicated JSP system design.

JSP’s performance also leaves much to be desired: a recent survey in ZDnet’s eWeek online publication found that PHP is as much as 3.5 times faster than JSP. In the Web environment, this makes JSP a significantly worse solution – because it can perform less transactions per second, and features considerably slower response times.

ZDnet’s eWeek also noted that

“JSP is a relatively new technology and still has clear market immaturities in terms of tools, support resources and available talent.”…Because JSP is based on Java, a strongly typed language, we had to declare the types of variables we used and manually convert between types when necessary. This makes JSP the hardest of the scripting languages we tested for nonprogrammers to learn…"2

PHP works with Java
It is important to note JSP is just one language with which Java objects can be accessed. PHP also can also integrate with Java, which means that it can be used as the scripting language for activating Java logic, just as much as JSP can. Unlike JSP, however, PHP also integrates with other component models, such as Microsoft’s COM, and adding support for new object models is extremely easy. This means PHP’s extensibility is infinite. JSP, on the other hand, is completely dependent on Java.

IBM programmer Sam Ruby uses PHP in combination with Java. Using the native Java support in PHP, Java objects can be created and used transparently, as if they were regular PHP objects.

AuctionWatch , which enables businesses of all sizes to benefit from dynamic pricing environments, has over 2.6 million unique visitors per month; 300K+ registered users; 1.2 million+ auctions launched every month. They tried to use Java, but opted for PHP because it’s easier to use and much faster to develop with. For further information, please contact Ben Margolin, Director of Seller Services for AuctionWatch (

Programming consultant Reuven Lerner has made some comparisons among the languages. His view of PHP is summarized as follows:

"The language is easy to learn. Graphic artists and Web designers might claim that they are not programmers, but the fact is that they’re doing increasingly large projects in JavaScript, VBScript, and other simple programming languages. PHP is much more regular and well-defined than Perl, and is much easier for new programmers to grasp than Java. Indeed, PHP seems like a server-side version of what JavaScript could have been, but isn’t. Someone with little or no programming experience can learn PHP and work with it after a very short period of time. This is probably true for VBScript, but certainly not for Perl or Java…PHP is a truly remarkable and powerful system.

I can see why it has become a popular system for producing Web sites… I think that it will be a very strong competitor against Java and JSPs, and will rise significantly in my recommendations for clients and internal use."

PHP: growing by the month
JSP enjoys the backing of Sun; hence its constant media attention. It is interesting to note that despite the lack of any publicity campaign, PHP’s popularity is growing at a monthly rate of 8-11%, a percentage far greater than the Internet’s 4% monthly growth – as the demand for server-based applications has risen. More than 6.5 million sites use PHP (Netcraft May 2001 survey). PHP is used on 39% of Apache servers; Perl trails fourth, with 11% of the market. Apache maintains 59% of the Web server market; Microsoft IIS is second, with 28% of market share (E-Soft Inc./SecuritySpace’s May 2001 report).

Prominent corporations using PHP include Unilever, Philips, NTT, Cisco, Japan Airlines, Air Canada, Lufthansa, GE Marketplace, Wallstreet:Online Germany; AuctionWatch, VillageVoice, Dialpad and BMC.

Intranet Design Magazine: PHP From an IT Manager’s Perspective, Jun 4, 2000.

:smiley: This Article From Zend
For more information and link relate this article visit

WOW that’s awesome dude…!