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 »

 

Service Level Management Best Practices Life Cycle Overview - Improve Service Levels

Best practices for Service Level Management (SLM) is a process for consistently meeting customer requirements and delivering on IT's promises. See the steps required to ensure high-quality SLM.

Sponsored by Compuware  Read this White Paper »

 

Keeping Your Members Safe from Online Scams and Predators

In order to keep fraudsters out, romance sites must deploy effective solutions that look at information independent of what is supplied by users. A device fingerprinting solution such as iovation ReputationManager™ provides unique insight into the computers being used to create multiple accounts and exposes hidden device-account relationships that identity-based fraud solutions often miss.

Sponsored by iovation  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.

Defend Against Blended Threats: What You Need to Know

Blended Web and email threats are becoming increasingly complex and represent a huge...  View Now »

 

Prescriptive Actions to Reduce Risk

In this Webcast, learn best practices for effective systems management in a heterogeneous environment and keep client systems cost under control.   View Now »

 

Webcast- Vantage 11: Redefining Application Performance Management

Compuware's latest release, Vantage 11, is a major advance in end-to-end application performance management--bringing together proactive issue identification, quantification of business impact and problem resolution into a single solution. Tune in to learn how Vantage 11's top-down approach helps you make better decisions and dramatically lower operations costs.  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
 

Return on Information: Google Enterprise Search pays you back. Get the facts.

VMware. The source for Business Infrastructure Virtualization.

ShoreTel tells businesses to untangle from competitors' complexity and turn to its brilliantly simple UC solution

See how AT&T can help protect your network.

Streamline IT Costs. Boost Performance with WAN Optimization.

Build your 1st app FREE with Force.com

TDWI checklist helps define data readiness for analytics. Download report.

A Clear View Toward Virtualization

Virtualization Technology as a Business Solution

The rules of infrastructure management just changed.

A Clear View Toward Virtualization

Interactive Q&A helps you discover key ways to maximize IT assets.

Ready to virtualize tier one applications? Check your virtualization maturity.

Think you can't afford a Cisco Switch? Cisco Catalyst Switches are now more affordable.

Five minute business analytics assessment. Immediate results.

The Case for Investing in Business Analytics Technology. Read white paper.

Upgrading to VMware vSphere with vWire

Top 10 Lessons Learned for Corporate 3G Mobile Broadband Deployments

CRM Built for IT: The Executive Guide to Selecting CRM that Meets IT Needs

Return on Information: Google Enterprise Search pays you back

ROI of Application Delivery Controllers

Making Consumer Two-Factor Authentication Simple and Cost-Effective

Mining the Cloud to Ease the Enterprise Compliance Burden

Solve Five Key IT Security Challenges with Cloud-Based Authentication

White Paper: Right-Sizing Your Power Infrastructure

AT&T Synaptic Storage as a Service. Expand on demand

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

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

Top Five CIO Challenges

Read the RSA report: Security for Business Innovation

64-page prescriptive guide to security, compliance, and IT operations.

Increase UPS efficiency without sacrificing protection.

eZine: A Roadmap to Reducing IT Complexity

Reduce risk, gain agility. See how Progress can help your business.

Virtualization Technology as a Business Solution

eZine: A Roadmap to Reducing IT Complexity

World-class trading technology solutions from NYSE Technologies.

If You're Paying for Telecom, You're Paying Too Much. Contact Asentinel Today.

Trade-In your old printer and save up to $1,000 plus free recycling!

infoBOOM! - The Mid-Sized Company CIO's Exclusive Community

Live Webinar: Applying Business Analytics. Click here to learn more

Removing Barriers To Better Server Virtualization Efficiency

4G Revisited. The Continued Evolution of Wireless Mobility.

What's Next for Enterprise Resource Planning?

Maximizing website Return on Information with high-quality search

Gartner Magic Quadrant, Application Delivery Controllers 2009

Authentication as a Service by Forrester Research

Cloud-Based Authentication for Next-Generation Extranets

Cut Costs & Green Your IT Operations with PC Power Management

White Paper: 4 Customer Service Myths

 
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.