Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Faster Page Loading
Why is PHP Code Considered Hard to Maintain? »

PHP as a Deployment Platform

November 4th, 2006

PHP has been incredibly successful as a deployment platform for web applications. The WordPress blog brags that the WordPress 2.0 series has been downloaded 1.2 million times.

However, PHP as a platform is far from homogenous. With many different versions installed and the vast configurability of php.ini, there can be a great deal of variation from PHP installation to PHP installation. PHP developers often ask what should I target? The question is the same if you want to write the next WordPress, or if you want to make sure your code is reusable for the next client that knocks on your door.

Nexen has been publishing PHP version adoption statistics for some time. Damien Seguy has really gone the extra step now by collecting and publishing configuration statistics. These are generated from scanning publicly available phpinfo() output.

The stats range from useful to blog candy.

One thing to keep in mind is sample bias. Damien compared the php version number of the sample against the version data collected from expose php and found they correlate well. But, perhaps there is a bias toward certain configuration settings (or versions) among those who have public phpinfo() data and those who do not. (The stats do have suitable disclaimers.)

Its hard to look at stats like this and decide what they represent. According to the Zend blog, 81% of their customers are using PHP 5, while the nexen monthly numbers report 11%. I think its fair to say that all of Zend’s customers use PHP, while many servers that expose_php are domain parking or serving static pages. What is the adoption rate for php 5? Who knows.

It would be interesting to see the correlation between those installations with expose_php off and the monthly version data, collected from the broader set of servers with expose_php on. I think it would also be interesting to see what functions are being disabled with disable_functions. Which extensions are being loaded? How many servers are running an opcode cache?

Which version of PHP to use? PHP 5 versus PHP 4? Unless you are constrained by legacy PHP 4, the answer is definitely PHP 5. Targeting PHP 4 isn’t going to make you the next WordPress. Its just going to put you as far behind the version adoption curve as they are.

PHP 5 is vastly easier to develop in than PHP 4. Development is expensive. Hosting is cheap. Don’t let the tail wag your dog. If your host doesn’t support 5, change hosts. PHP 5 hosting is not rocket science.

I know the decision is that not simple, but the excuses for remaining with PHP 4 are dwindling.

Which configuration options to target? There was some talk recently on the PHP internals list about creating a recommended .ini profile for development environments and one for production environments. I think this is a great idea. Hopefully, then folks installing PHP can choose a profile instead of setting individual .ini options. Perhaps this would help reign in some variability and reduce some Paradox of choice style unhappiness.

Filed Under

  • Open Source, PHP, Software Design

Related Posts

  • Difficult deployments
  • Enterprise PHP
  • Why is PHP Popular?
  • Shipping Software is fun
  • A Glimpse into the Future: PHP 6
You can leave a response, or trackback from your own site.

41 Responses to “PHP as a Deployment Platform”

  1. Ilia Alshanetsky says:
    11/5/2006 at 11:28 am

    Damien publishes monthly stats gathered by examining most IPs in the ipv4 range (with exceptions for virtual hosts) to calculate popularity of different PHP versions. This gives you a fairly accurate representation of what people are actually using as this data comes directly from the X-Powered-By header spit out by PHP on most requests. Based on this data is the 10-11% market for php5 is determined.

  2. Peter Bowyer says:
    11/6/2006 at 1:52 am

    I think I’d go for somewhere closer to the 11% adoption of PHP5 than 81%. I’m still having to write PHP4 because that’s what everyone who contracts me is using. Now anything I write where I can provide the hosting or specify it is PHP5, but it’s still not a big enough % to make me happy!

  3. PHPDeveloper.org says:
    11/6/2006 at 12:41 pm

    Jeff Moore’s Blog: PHP as a Deployment Platform

  4. Mark de Visser says:
    11/6/2006 at 9:37 pm

    Just playing with these numbers a bit:

    Assume that 4 million developers, releasing 1 new site per year. Of these 80% in PHP 5, 20% in PHP 4.

    Currently out there 20 million websites, 10% of which is now PHP 5, 90% PHP 4.

    In addition to creating 1 new site, the 4 million developers also convert 1 site per year to PHP 5.

    Even in that case it will take another year before Damien will show 10 million PHP 5 websites versus 15 million PHP 4 websites. And that does not account for the fact that all new sites created with tools such as Wordpress will show up as PHP 4 sites (even my own new blog falls in that category).

    So % of developers currently programming in PHP 5 is a very different statistic than % of websites on the internet created in PHP 5.

  5. kevinxiao says:
    8/25/2010 at 8:43 am

    The 4 million developers also convert 1 site per year to PHP 5

  6. lisa says:
    11/13/2011 at 9:15 am

    As it mentioned in the post “PHP as a platform is far from homogenous”.I agree with this idea.

  7. How to Run Faster says:
    11/14/2011 at 4:58 pm

    Do you have a spam problem on this site; I also am a blogger, and I was wanting to know your situation; many of us have created some nice practices and we are looking to swap solutions with other folks, why not shoot me an email if interested.

  8. Brant Reigh says:
    12/22/2011 at 10:26 am

    Very nice post. I just stumbled upon your weblog and wished to say that I’ve truly enjoyed surfing around your blog posts. After all I’ll be subscribing to your rss feed and I hope you write again soon!

  9. Allen Wahdan says:
    1/2/2012 at 4:05 am

    Hi, i think that i saw you visited my website so i came to “return the favor”.I’m attempting to find things to improve my site!I suppose its ok to use a few of your ideas!!

  10. Mariela Barut says:
    1/6/2012 at 10:52 am

    Simply desire to say your article is as astonishing. The clearness in your post is just great and I could assume you are an expert on this subject. Fine with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the gratifying work.

  11. Nathan Edsall says:
    1/6/2012 at 1:18 pm

    I think this is among the most important info for me. And i’m glad reading your article. But should remark on few general things, The site style is ideal, the articles is really nice : D. Good job, cheers

  12. Jacqulyn Youree says:
    1/9/2012 at 10:32 am

    I think this is one of the most vital info for me. And i am glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really nice : D. Good job, cheers

  13. Kelsie Teaque says:
    1/9/2012 at 4:58 pm

    Hi there, just became aware of your blog through Google, and found that it’s truly informative. I’m gonna watch out for brussels. I’ll appreciate if you continue this in future. A lot of people will be benefited from your writing. Cheers!

  14. Ronald Cleland says:
    1/10/2012 at 5:13 am

    Great blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your design. Bless you

  15. Bart Seman says:
    1/10/2012 at 10:36 am

    Definitely believe that which you stated. Your favorite justification seemed to be on the net the easiest thing to be aware of. I say to you, I certainly get annoyed while people consider worries that they just do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people can take a signal. Will probably be back to get more. Thanks

  16. Bernardo Luque says:
    1/19/2012 at 10:30 am

    Fantastic goods from you, man. I’ve understand your stuff previous to and you’re just extremely

  17. Keesha Sagona says:
    1/19/2012 at 11:29 pm

    Excellent goods from you, man. I have understand your stuff previous to and you are just extremely great. I actually like what you’ve acquired here, certainly like what you’re saying and the way in which you say it. You make it enjoyable and you still care for to keep it sensible. I cant wait to read far more from you. This is really a tremendous site.

  18. Clair Kunstlinger says:
    1/22/2012 at 12:02 am

    I’m really impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it’s rare to see a nice blog like this one nowadays..

  19. Sylvester Karlinsky says:
    1/22/2012 at 8:46 pm

    great. I actually like what you’ve acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still take care of to keep it wise. I can’t wait to read far more from you. This is actually a wonderful web site.

  20. Thao Musi says:
    1/25/2012 at 1:47 pm

    I’ve been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all website owners and bloggers made good content as you did, the net will be much more useful than ever before.

  21. Javier Eichele says:
    1/25/2012 at 3:07 pm

    Fantastic beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

  22. Fermina Segrest says:
    1/25/2012 at 3:40 pm

    I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did, the web will be much more useful than ever before.

  23. Brant Reigh says:
    1/26/2012 at 10:16 pm

    Just want to say your article is as astonishing. The clarity in your post is just great and I can assume you’re an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  24. Domingo Purdie says:
    1/27/2012 at 12:25 am

    Heya i’m for the first time here. I found this board and I find It truly useful & it helped me out much. I hope to give something back and aid others like you helped me.

  25. Stephan Livigni says:
    1/27/2012 at 4:02 pm

    Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message home a little bit, but instead of that, this is great blog. An excellent read. I will certainly be back.

  26. August Beger says:
    2/4/2012 at 10:03 pm

    Hi, I think that I saw you visited my site so I came to “return the favor”.I am trying to find things to improve my site!I suppose its ok to use a few of your ideas!!

  27. Ronald Renova says:
    2/7/2012 at 1:53 pm

    It is the best time to make some plans for the future and it’s time to be happy. I have read this post and if I could I wish to suggest you some interesting things or advice. Maybe you could write next articles referring to this article. I wish to read even more things about it!

  28. Anibal Tony says:
    2/8/2012 at 10:45 am

    What’s up, after reading this remarkable post i am as well cheerful to share my knowledge here with mates.

  29. Sammy Boal says:
    2/27/2012 at 10:51 am

    Hello There. I found your blog using msn. This is a very well written article. I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.

  30. Ginger Rouleau says:
    2/27/2012 at 11:36 pm

    Just wish to say your article is as astounding. The clarity in your post is simply spectacular and I could assume you’re an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.

  31. Kesha Sponseller says:
    3/11/2012 at 10:57 pm

    I like the helpful info you provide in your articles. I’ll bookmark your blog and check again here frequently. I’m quite sure I’ll learn many new stuff right here! Best of luck for the next!

  32. Parker Posley says:
    3/12/2012 at 12:40 pm

    I’ve been browsing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my view, if all webmasters and bloggers made good content as you did, the internet will be a lot more useful than ever before.

  33. go learn web98. says:
    3/13/2012 at 6:52 pm

    [...]The information mentioned in the article are some of the best available [...]……

    [...]The information mentioned in the article are some of the greatest available [...]……

  34. Eddie Remfert says:
    3/15/2012 at 11:49 am

    I don’t even know how I ended up here, but I thought this post was good. I do not know who you are but definitely you’re going to a famous blogger if you aren’t already ;) Cheers!

  35. Shirley Buerstatte says:
    3/22/2012 at 1:26 pm

    Hi, i think that i saw you visited my web site so i came to “return the favor”.I’m attempting to find things to enhance my web site!I suppose its ok to use some of your ideas!!

  36. adlawldkja ajdlakjdlkawj says:
    3/23/2012 at 4:45 pm

    Thank you created for ad the following, It is quickly what precisely As i seemed to be looking for for the purpose of upon yahoo. I’d quite a whole lot reasonably pick up viewpoints at a individual, a bit when compared with a business internet page, that’s the reason I genuinely like web logs for that reason a whole lot. Bless you!

  37. Thao Musi says:
    3/26/2012 at 3:47 pm

    Wonderful beat ! I wish to apprentice while you amend your website, how can I subscribe for a blog web site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept

  38. Fay Magbitang says:
    3/28/2012 at 9:57 am

    Hello, i think that i saw you visited my site so i came to “return the favor”.I am trying to find things to improve my site!I suppose its ok to use some of your ideas!!

  39. Roberto Brumble says:
    4/5/2012 at 10:56 pm

    Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I’ll be subscribing to your feeds and even I achievement you access consistently quickly.

  40. Tracey Madras says:
    4/13/2012 at 3:50 am

    Wow, wonderful blog format! How lengthy have you ever been running a blog for? you made blogging look easy. The entire look of your website is great, as smartly as the content!

  41. Karma Bezanson says:
    4/24/2012 at 3:09 pm

    Thank you for this insight in Marc’s practice, Kate!

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (18)
    • Open Source (14)
    • PHP (99)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • The Legality of Republishing RSS Feeds  28
      Tory Rennemeyer, eenicker, Reverse Phone Lookup [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  258
      Tuan Lal, Lavagem de estofados, Edward L. Kind [...]
    • php | tek 2008  36
      how to mend ice machine, Akademija Debelih, Odbacena [...]
    • goto in PHP  59
      kasor, Thomas Valdivieso, Murray Ziadie [...]
    • Firefox Extensions for Web Developers  33
      kasor, Website Design Toronto, mobila bistrita [...]
    • Why PHP is easier to learn than Java  68
      kasor, Justina Calvery, Guy Lipton [...]
    • Meta Tag Refresh Faux Paux  43
      html email templates, E-Juice Reviews, image [...]
    • Improved Error Messages in PHP 5  49
      Carroll Tina, Przeprowadzka, Emery Harari [...]
    • Benchmarking PHP's Magic Methods  33
      kayu oyunlar?,dora,oyun,oyna, Benjamin Bejjani, paypal website [...]
    • Microbenchmarks of single and double qouting.  24
      kefir grains minneapolis, sexshop dildo, tuim688 [...]
  • Recent Posts

    • Richard Thomas
    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
  • Site

    • Archives
    • Log in
  • Search