NEWSLETTERS
 

CIO.com updates, insights and advice on technology, management and your career.

 CIO BlackBerry News and Tips
 CIO Research and Analysis
 CIO Microsoft
 CIO Insider
 
 
 
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       WEBCASTS    
 

Windows 7 Webcast Series

There's a lot of buzz about Windows 7 out there. Each month in our webcast series, listen to analysts and customers discuss how Windows 7 and the Windows Optimized Desktop is impacting large companies around the world. Learn how they evaluated Windows 7, including the cost of deployment, deployment strategies, and tangible benefits.

Sponsored by Microsoft  Listen to on-demand Recordings »

 

A Framework for Better Application Delivery

The complexity of application delivery is driven in part by the evolving applications environment. Instead of approaching application delivery from a siloed fashion, this handbook looks at end-to-end guidance and discusses the impact of ignoring the WAN, Web apps that are chatty, data center consolidation, SaaS, Web 2.0 and virtualization.

Sponsored by Riverbed  Read this White Paper »

 

Microsoft® Exchange 2010 includes archiving - but is it enough?

Microsoft® Exchange 2010 includes basic email archiving. But many organizations will find that it does not meet their requirements. This paper describes why organizations need to archive, what capabilities Exchange 2010 includes and why 3rd party archiving solutions will be necessary for most organizations.

Sponsored by Google, Inc.   Read this White Paper »

Resource Alerts

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

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.

Enterprise Capture: Your Onramp to Business Process Automation

Today more than ever companies are seeking to reduce costs and...  View Now »

 

The True Cost of Legacy Systems

How well are you maximizing existing software assets? This webcast reveals the results of a commissioned study on top migration and modernization priorities for IT leaders.   View Now »

 

How To Maximize Your Virtualization Strategy and Deployment

Join award-winning technology journalist Stan Gibson in this webcast as he discusses how to enhance your virtualization strategy with the ROI, planning, implementation and platform advice. Exploit the business benefits of virtualization and successfully expand your current deployment.   View Now »

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
 

Manage limitless content todayread EMCs 15-minute guide to ECM.

HP Exstream. Get a Free Document Assessment for Financial Services.

Take the Netezza TwinFin TestDrive!

Webinar: Jump-start your in-house e-discovery with Ringtail QuickCull from FTI Technology

Let Progress Software help your business make progress.

Best Practices to Reduce IT Operational Costs

Real-world testing ranks Trend Micro #1 against malware. See results.

Forrester: The real-world financial impact of Windows 7

Turn your desk phone and mobile phone into one with Sprint Mobile Integration.

Maximizing efficiencies with unified communications.

Stay informed with custom newsletters from Tech Dispenser

Selecting the Right Reporting Technology

An IT Leadership Action Plan for the Economic Recovery

Consolidate data centers and lower IT service costs. Learn How.

WAN optimization techniques significantly improve application performance. Read More.

The Revolution and Evolution of Private Cloud Computing

ROI of Application Delivery Controllers

Cut Costs & Green Your IT Operations with PC Power Management

Enterprise Capture: Your Onramp to Business Process Automation

Adobe® LiveCycle®solutions for intuitive user experience

Unlocking the Mainframe: Modernizing Legacy System to SOA

State of the Data Integration Market

Enhance Customer Loyalty through Higher Responsiveness

Achieving Business Agility with Application Grid

Seven Ways ITIL Can Help You in an Economic Downturn

Does your IDS really work? Find out with a free Endace Audit

Verint Systems. Discover the Power of Intelligence in Action"

CA ARCserve r12.5 is More Than Backup! Download Trial Version Today

Enterprise search helps employees get more done. Get the facts from Google.

See why ShoreTel is named best overall VoIP provider by Nemertes Research

Trend Micro ranked #1 against real-world malware. Read more.

AT&T Application Management & Hosting. Let us help you STRETCH

Microsofts new client operating system helped Pella reduce power consumption.

Efficiency goes up. Costs come down.

Dark Fiber from Sunesys Save on Unlimited Bandwidth with Fixed Costs.

Trend Micro ranked #1 against real-world malware. Read more.

Webcast: Solve Your Data Visualization Needs with Open Source BI

Webcast: Delivering the Enterprise-Ready Cloud

Ensure cost effective application delivery. Learn More.

Cloud Computing: The Impact CIOs See

What's Next for Enterprise Resource Planning?

Gartner Magic Quadrant, Application Delivery Controllers 2009

Global Research: CIOs Weigh In On Virtualization

Adobe® LiveCycle® solutions for business process automation

What's New in SOA Suite 11g?

Unleash the Power of Java with Oracle JRockit Real Time

SOA Best Practices and Design Patterns

Application Grid: Ideal Platform for IT Consolidation

Taking the Service Desk to the Next Level

 
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.