IT DRILLDOWN
 
NEWSLETTERS
 

Learn what's new and interesting from CIO and CIO.com.

CIO's editors deliver the latest updates, insights and advice on hiring, firing and inspiring.

CRM, ERP, SCM, KM, Security .and other key enterprise initiatives explained.

More Newsletters | Edit Profile

   
 
 
SUBSCRIBE TO CIO
 

Are you involved in setting the direction for your company's IT budget or strategy?

Apply today for a FREE subscription to CIO Magazine!

» Subscription Services

» Reprints

 

 

Reader Feedback

You Used PHP to Write WHAT?!

 

Despite significant shortcomings, PHP is perhaps the most popular Web scripting language in the world. But despite a large collection of nails, not every tool is a hammer. So when should it be used, and when would another dynamic programming language be a better choice? We identify its strengths and weaknesses.

View Article »

READER FEEDBACK

Anonymous Fri, 2008-01-25 22:44

PHP and Scalability

Doesn't yahoo run it's sites with PHP... plus you suggest Java and Jave sux

Jesse Donat Sat, 2008-01-26 00:03

Not Scalable? Ever hear of a little something called Facebook? Java is a terrible excuse for a web development tool, Java is a generally terrible language. The only reason its even still used is its become many college students first language, which is a crying shame in it self. .Net is more efficient than Java for crying out loud and Sun had how many years up on them to improve it? In conclusion, to say PHP isn't scalable is plain ignorant.

yutamo Sat, 2008-01-26 01:25

Friendster used to be Jsp/Java. Could somebody tell me why they to ported to Php?

Last thing I heard, they hired the best java programmers and authors of java/jsp books they can find to fix the problems associated with java/jsp on Friendster. No improvement. Came Php and everything was solved.

Btw, does the author know about set_time_limit() to control how long a Php process can execute? I have a feeling that the author lacks research or whatever.

Ken Hess Sat, 2008-01-26 11:30

I am a PHP developer--among other things and have developed PHP apps for major companies and for the one I work at now. I know about how to increase memory and time limits for PHP scripts and also know that PHP has some serious limitations. I have developed in .NET too but prefer PHP and turned down a job doing .NET development because of my own prejudices. I am no fan of Java either - I have tried to develop in it but I just hate it - but one must admit that it is a true enterprise solution.
PHP is cool and getting cooler but there are many things missing. The PHP developers, prompted by complaints, are basically turning it into Java so that it will scale to the Enterprise.

PAS Sat, 2008-01-26 17:33

If you are going to make a statement like PHP isn't Enterprise ready, then you better back it up with some proof, or a good reason why. The other two articles on Perl and JavaScript were a bit better, but this article had no weight behind it at all.

pcdinh Sun, 2008-01-27 06:39

Feel free to disagree with me but I think that your statement on PHP scalability is not fair.

Yahoo, Facebook, Wikipedia, Technorati, Digg, Flickr, Friendster and countless extremely high traffic websites are powered by PHP. PHP may be not really good at long running application but its power on web-based short request-reponse model is proven.

The PHP Scalability Myth: http://www.onjava.com/pub/a/onjava/2003/10/15/php_scalability.html

Digg PHP's Scalability and Performance: http://www.oreillynet.com/onlamp/blog/2006/04/digg_phps_scalability_and_perf.html

PHP Scalability & Performance Facebook: http://www.geeksessions.com/media/1.3/lucas_nealan.pdf

Yardboy Sun, 2008-01-27 12:28

Author does not really understand the "register globals" issue. It's not about "declaring variables before use" it's about automatically registering a plain global variable for every http request parameter passed in regardless of whether it came from a POST, a GET or a COOKIE. And, yes - it's fixed permanently in 6 and has been fixed by default since 5.

Jeff Dickey Mon, 2008-01-28 01:53

Pure FUD, leavened with BS for flavor. This seems to have been written by somebody who's deeply invested his career in Java and is now coming to the realization that Java over the next five years is going to be roughly where RPG II or Lisp have been for the last five; to put it mildly, not an expanding, lucrative market.

I've been developing software professionally for almost 30 years, and doing Web development for over ten. I make it a point to learn two languages a year well enough to be able to pick them up again and do professional-level work on short notice. I know Java quite well, along with Python and perl; I've used each of them on enough different Web and standalone projects that I am confident that I have at least a journeyman-level awareness of their strengths and weaknesses. I have been doing PHP development since well before PHP 4 was real. PHP 5, and especially 5.2, have been my Web development language of choice since their inception. PHP 5 brings a good-enough object and interface model, non-perl-like clarity and obviousness of approach, and an architecture that lends itself readily to easily scalable applications (unlike, say, Rails). Yes, PHP does require you to know what you're doing if you are to do it well, but I happen to think of that as an advantage. It also, somewhat regrettably, allows one to develop absolute spit spaghetti code, but that can in practice be refactored long before it becomes as impenetrable as some of the production perl I've worked with/done battle with, which makes APL as cheerily verbose as COBOL and PL/I in comparison.

PHP shouldn't be the only tool a self-styled professional-level developer (or even a serious amateur) has in his toolbox, but it has earned its success through shipped code that works, rather than geek buzz(perl,Rails) or marketing budgets(Java). That, in and of itself, should recommend it highly.

Andrew Z Mon, 2008-01-28 11:18

PHP doesn't scale well. Hmm... ever heard of Wikipedia? They run on the LAMP (Linux, Apache, MySQL, PHP) stack, and their site is quite responsive.

Feature overload can definitely cause slowdowns, however. I recently switched a client's website from PostNuke to a custom lightweight CMS (also written in PHP). The Nuke site was incredibly slow, taking nearly 1500 milliseconds to respond when a link was clicked. The new site was lightning-fast, never taking more than 200 milliseconds to respond. (This includes the 100-150 millisecond latency of my network connection.)

My CMS was about 1500 lines of code, compared to Nuke's 10,000+ lines. Why run code you don't need? It slows you down and increases your attack surface.

Regarding security, PHP is only insecure if used improperly.

Consider these common security "threats":

  • register_globals
  • SQL injection
  • Code injection

Register_globals can be dangerous if you don't initialize your variables properly, but variables are supposed to be initialized anyway. Register_globals is off by default in PHP 5 and will be removed in PHP 6. In fact, the first thing I do when I set up a website is to turn OFF register_globals via a php.ini file.

SQL injection can be largely eliminated by input filtering. Getting a Webmail message ID? It must be an integer. I'll be that nobody here can figure out what value $x should have, such that intval($x) is unsafe to use in a database query!

The chance of code injection can also be largely reduced by careful design. I've been programming in PHP since I was twelve, and I've only written two scripts using the eval() function - and both of them used carefully validated, hard-coded parameters. If your site will execute arbitrary code from the query string, you'd better think VERY carefully - it's almost never necessary.

Jim Collins Mon, 2008-01-28 12:42

ColdFusion has a number of advantages over PHP, has a very robust API, and works well with both Java and .NET.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

 
  PARTNERS       PODCASTS       WEBCASTS    
 

Enterprise Content Management: From Strategy to Solution

Enterprise content management (ECM) has become an important competence and infrastructural technology, particularly for large and medium-sized organizations. Hear about industry trends for ECM and why standardizing your ECM platform is so critical to your success during this roundtable discussion.

Sponsored by IBM  View This Webcast »

 

Get Rich or Get Thin: The Secure Client Webcast

Malcolm Harkins, General Manager of Intel's Information Risk and Security group, looks at the increasing sophistication of attacks. He also talks about he pros and cons of thin and rich clients in fending off those attacks.

Sponsored by Intel
  View This Webcast »

 

The Greening of the Data Center

This report outlines a four-part strategy companies can employ to achieve an energy-efficient infrastructure.

Sponsored by Sepaton  Read this White Paper »

More Partners »

Resource Alerts

Get instant email notifications by topic when white papers, webcasts, and case studies are added to our library.

Podcast: Accenture's View on Software as a Service

Publisher Emeritus at CIO magazine, Gary Beach, talks to Accenture Chief Architect, Paul Daugherty, about where software is going, and in particular about the emerging concept of software as a service and its contribution to high performance.   Read More »

 

Business Service Management: Delivering Value Throughout the Service Lifecycle

Business and IT alignment is as much a priority among CIOs, as it is a challenge...  Read More »

 

Talking Innovation with a Hall of Famer

Bill Walsh, lauded for his innovative thinking on the football field, talks techniques for applying innovation to every job.  Read More »

More Podcasts »

Resource Alerts

Get instant email notification when white papers, webcasts, and case studies are added to our library. Don't just be up-to-date—be up to the minute with our new Resource Alerts.

Crossing The Data Divide: The Case For Complex Data Exchange Technology

Hear the results of a new study conducted by IDG examining how to maximize the value of your enterprise information assets by automating the data exchange process. Join now and learn how technology can help you Cross The Data Divide.   Read More »

 

Collaborative Resiliency: A Unified Approach to Risk Management

Climate change, oil price shock, pandemic and acts of terrorism are true risks that cannot be ignored...  Read More »

 

The Great Escape: Contact Center Applications Are Moving into the Enterprise

With resulting benefits such as tighter integration with back-office applications, administrative control, and improved communications, contact center applications are moving into the enterprise. In this webcast...  Read More »

More Webcasts »

Resource Alerts

Get instant email notification when white papers, webcasts, and case studies are added to our library. Don't just be up-to-date—be up to the minute with our new Resource Alerts.

 
 
FEATURED SPONSORS
 
 
 
SPONSORED LINKS
 

White Paper: Learn how to succeed with BPM

Webcast: Research insight into how organizations are using virtualization

ITIL V3 and the IT Service Catalog

The New Growth Paragidm: Multi-Enterprise SOA

3M saved $3M on printing. Learn how HP can help your business

Enterprise Service Bus: A Definition

Let's Get Virtual: A Look at Today's Server Virtualization Architectures

Increase conversions on your site with the help of EV SSL.

Get Control of Mobile Data (and More)

Data Loss Prevention Starts at the Endpoint

Building a Foundation for Pragmatic Service Management White Paper

Performance Brief: Mobile Application Acceleration

Strategies for centralizing data backup

Citrix XenServer FREE trial

Nothing Short of Revolutionary: Four Steps toward More Effective Enterprise Finance

The Best IT Strategy for a Company with Global Operations

Speed, agility, flexibility - The HP BladeSystem c-Class

The Business Value of Symantec Data Center Foundation Solutions

Webcast: Why standardizing your ECM platform is so critical to your success

The PCI Data Security Standard

White Paper: Assess Your SOA

The Universal Wireless Client: Simplify mobility and reduce the cost of supporting mobile workers

Tuning ERP and the Supply Chain for Profitable Growth

Compliance by the numbers- addressing requirements with online document management and collaboration technology

Webcast: Learn how to Simplify and Standardize Architecture

Global Crossing is the most viable alternative for voice, video and data.

The New Foundation of Storage: Xiotech's Intelligent Storage Element

BPM Done Right: 15 Ways to Succeed Where Others have Failed

3 Reasons to Invest in Integration Technology Now

A CIO's View of Server Virtualization

Survival of the Fittest: Disaster Recovery Design for the Data Center

Windows Server 2008: To Upgrade or Not to Upgrade?

How Office 2007 Exposed Bill Gates

How to simplify mobility and reduce the cost of supporting mobile workers

Helping IT Become a Service Provider White Paper

Extending PCI Compliance to the Mobile Workforce

A proven approach to WAN optimization

Wireless Vulnerability Management: What It Means for Your Enterprise

Green IT: Reducing Your Carbon Footprint with Citrix

Wide-area data services enable todays global enterprise

Discover PMI's credentials and career path tools

Symantec State of the Data Center Report

Getting the Most from your Data Protection Solution

Tripwire PCI DSS Solutions: Automated, Continuous Compliance

ITCi White Paper: Challenges and Opportunities of PCI

TDWI Research report clears confusion about automating data governance

White Paper: Unlocking the Potential of B2B

See why 93 of the Fortune Global 100 depend on Blue Coat.

Taking Document Automation to the Next Level

Video Series: IT Leaders discuss how IT is becoming part of the innovation cycle.

 
CIO MARKETPLACE buy a link
 
Software License control, Windows XP/2000 Upgrades

Use your Intranet to manage Software Licenses, plan for Windows XP/2000 upgrades, do Security Audits and more. Click to try and ask for our white paper - PC Management for the Internet Age.

UNIX and Linux Performance Tuning Simplified

SarCheck is a performance analysis and tuning tool for most UNIX & Linux operating systems. It produces recommendations with full explanations, and both supporting graphs and tables. Get the most from your hardware by keeping your systems tuned.

.NET Developer Wanted - Boston - Local Candidates

AIR provides sophisticated analytical tools and software systems to help companies manage that risk. We are seeking a Sr .NET Developer with 8-10 yrs exp in .Net & OO development. ASP.NET, VB.NET skills required. Annual bonus - Apply Now

Get More from Your Oracle Database

DBAs are constantly challenged to increase performance and keep costs down. This paper discusses the industry best-practice Wait-Event analysis and how Confio has combined this with their Resource Mapping Methodology to optimize DB performance.