Krillz.com

A coder’s steps revealed


Search



I’ve been working on my book for quite some time now and I have to say that while writing I sometimes find myself in a position where I think: How come I do that, or why do I really do that.

One of these moments happened when I came up with a chapter on why to use PHP. A sure thing in a PHP book in my opinion, it being in it was as sure as sun rising in the morning, but the answer to that question up front was simply because I like it. Now that doesn’t do it, especially not for a book right? So I had to spend some minutes to reflect about why do I use and like this
programming language called PHP?

I ended up with ten points on why I use PHP and I guess this would be a good post here on my blog, as it seems people like lists in general and maybe I could get some people out there that aren’t really sure about whether PHP is good or bad, to get some insight at least.

Well I will not answer that question for you, you already know my opinion, what you think is up to you, I will simply share 10 points that put me on the “pro” PHP side.

1. The PHP Community

The best thing about PHP is the huge community around it and that’s why I’m listing this as number one. I personally believe that without the great community PHP wouldn’t have become what it is today.

So what makes the community so great you might ask?
Well there are many reasons that makes it so great and I’ll mention the most important reasons.

For once they are a great resource, whether it comes to getting help or finding code examples regarding PHP. You have a problem with your code, no problems as there are literally hundreds of sites with forums and mailing lists where you can ask for some help to figure out what’s wrong. You can ask for advice if you hit a wall while coding and don’t know what solution would be best.

There are a great amount of sites with tutorials and code examples on how you code certain PHP applications and scripts, where you can see how you go about in making a forum or whatever you might be wondering, or simply get inspiration to your projects.

This point alone has a lot to do with why I like PHP and the community around it so much!

2. Learning PHP is easy!

Another reason why I like PHP is because it’s very easy to learn and get a hang of compared to some other languages I’ve learnt over the years.

I started learning PHP in the end of the fifth grade, so I was quite young in my opinion and I managed to learn it, not master it at the time, but I could produce some simple scripts back then.

Learning PHP isn’t rocket science and with the great amount of help found on the net it makes the learning process much easier. As I mentioned earlier, there is a great community that you can take advantage of while learning it.

Another thing that makes PHP easy to learn for other programmers, especially the Perl, C and C-like language programmers (Java and C++) is that the PHP syntax is based on primarily C and Perl.
This means that if you have experience with any of those languages you will pretty much be producing productive code instantly.

3. Its Performance

The performance of PHP is great, it’s very efficient. Using it on a single inexpensive server you can literally serve millions of hits each day.
Zend Technologies (www.zend.com) released benchmarks which show that PHP outperformed its competition.

If you want to run a large number of commodity servers then your capacity is for sure unlimited.
In other words PHP has a great performance rate!

4. The low cost

The price of PHP is the amazing amount of zero.
It’s free and you can download the latest version of PHP at any given time from www.php.net

5. It’s Open Source, You can modify it

Open Source which means that you have complete access to its source code.
If you want to modify or simply add something to the language, you can do it. Unlike commercial closed-source applications you don’t have to wait for the manufacturer to release patches, if you have the knowledge you can do it yourself.

But with the great community around PHP, patches and fixes appear much faster, a lot thanks to PHP being Open Source, more people can contribute.
Also you won’t have to worry that the manufacturer will go out of business, thanks to it being Open Source and the great community the product lives on.

6. The built in libraries

PHP was designed to be used on the Web, because of this it has a lot of built in function, to be used for many different web related tasks.
You can connect to web services and other network services, parse XML, send email, generate PDF documents, send emails and generate GIF images on the spot.
This is just some of the functions you find in PHP.

A part from the official libraries, some programmers have developed more libraries that can be found, whether it’s a library with functions to work with audio or video or something completely different it most likely already exists.

And that’s another good part of PHP; you can add custom libraries to it all after you needs.

7. Its Portability

Today PHP is available for many different operating systems whether it’s a free Unix like operating system such as Linux or a system you paid for like Microsoft Windows you can run PHP on it.
I won’t list all the operating systems that you can run PHP on here, for that I suggest you to google it.
Well written code will usually work without modifications on different operating systems with no hassle. Of course there are functions in PHP that only work on a specific operating system, so it not working on a different wouldn’t be any surprise.

8. It has a strong Object-oriented support

PHP version 5 has very well designed object-oriented features.
If you’re not using PHP 5 yet I strongly recommend reading my post on
why to use PHP 5.

It now has features like inheritance, private and protected methods and attributes, abstract classes and methods, constructers, interfaces and destructors.
There are even features of built in iteration behavior which was available in version 3 and 4 but the over all object oriented support in PHP 5 is much more complete in php 5.

If you program in C++ or Java then all this will be familiar to you, and PHP’s syntax being very similar as well will just make it all a lot easier.

9. It has interfaces to a large variety of database systems

Whether you’re using MySQL, PostgreSQL, mSQL, Oracle, dbm, FilePro, HyperWave, Indormix, InterBase, Sybase databases, you can connect to those with PHP, there are many more but I found that list long enough.

PHP 5 also has a built in SQL interface to a flat file called SQLite.

10. Support available

Zend technologies the engine powers PHP offer support and related software on a commercial basis.

So if you’re a company which wonders if choosing PHP will leave them in the dark then here’s you’re answer, support is available if needed.
Also for the non commercial users there’s support available in another form, the PHP community which I mentioned earlier.

And that’s the end of the list: why I like PHP.
I hope you enjoyed it and feel free to add anything else you like about PHP that I didn’t come up with at the time I was writing this.

Share with the world: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Slashdot
  • del.icio.us
  • Digg
  • Technorati
  • Reddit
  • StumbleUpon
  • YahooMyWeb
  • DZone
  • MisterWong

22 Responses to “10 reasons why I use PHP”

  1. I really can’t think “where”:http://www.h3rald.com/articles/10-reasons-to-learn-ruby
    you got the idea for your article from! Anyhow, 9 out of 10 of your “reasons” (I left out the performance-related one, OK) apply to Ruby as well, and to Python too I bet! Unfortunately PHP’s syntax and language (dis)organization leave a lot to be desired…
    Anyhow, thanks for the article!

    Fabio Cevasco

  2. And what about most important things like productivity, expression, maintanability, bugs proof ?

    - Assembler is easier to learn.
    - STRONG object oriented support ? are we in 90’s ?

    giku

  3. I should reconsider:
    “8. It has a strong Object-oriented support”

    PHP has everything but what you mention at 8.

    Its true that there is major difference in oop support from php4, but the real oop feautres are missing from php, php its lacking in oop features.

    (Among the most important weaknesses: no namespaces, no real introspection, php its a true mess in oop features)

    iongion

  4. Krystian Hoffman’s Blog: 10 reasons why I use PHP…

    PHPDeveloper.org

  5. to jongion.
    Indeed it’s not a complete oop language and I don’t think it will be one for quite some time.

    That’s why I mentioned much more complete and not completely complete.

    However it’s a much better improvement since the last version so we can only hope that php 6 will have a even better OOP functionality.

    Krillz

  6. […] Here’s some of his list: […]

    developercast.com » Krystian Hoffman’s Blog: 10 reasons why I use PHP

  7. Strong OOP? Please, try a real language.

    Jeff

  8. […] Read this article: 10 reasons why I use PHP […]

    Skis / Toys / Fun » Response to 10 reasons why I use PHP

  9. Günün Bağlantısı: PHP kullanmak için 10 sebep

  10. hi all. nice site. by.

    alex

  11. That you are writing a book is scary.

    PHP doesn’t have destructors. The OOP implementation is hackish and amateurish, to be generous.

    There are a couple of other points that you are completely wrong on as well.

    jawngee

  12. jawngee.

    What is scary about me writing a book, the only scary thing I can see is you judging whether one can write based on one post, you don’t know me. But thanks anyway.

    no destructors? you should read up on what php really has, it’s not what you maybe are used to from some OOP languages, nevertheless it’s a destructer which works in a similar way.

    wrong about what, please tell me.
    if you refer to the strong OOP point, what I meant with that headline was compared to php4, onfortunately I didn’t consider against other OOP strict languages where it still lacks a lot.

    Krillz

  13. How do I use PHP5?
    It is difficult to install it on windows xp with IIS Already installed for asp.net.

    sachin

  14. sachin, you need to add php5isapi.dll or the CGI approach.

    control panel -> Internet Information Panel (you should have this, if not reinstall ISS)
    it’s found under administrative panel.

    You should see a tree view of services on the left, right click the web server, (usually called Default Web server) and select properties.

    In the box that pops up, a lot of info here, but you just have to change a few, Under Home Directory, click on configuration.

    Under application mappings select add, to add php.
    Then supply the full path to the executable, eg. c:\php\php5isapi.dll

    save then restart ISS.

    Krillz

  15. […] mas populares y con el que me siento mas cómodo trabajando. Hoy comparto una de mis lecturas desde Krillz.com el cual hace un recuento de diez muy buenas razones para trabajar con […]

    10 razones para usar PHP » unijimpe

  16. Thank you for sharing!

    Wahoo

  17. […] tivssemos uma lista como essa em sites oficiais do PHP, a informao teria uma credibilidade muito […]

    Newton Wagner » Blog Archive » Ainda falta Marketing para o PHP

  18. I can’t say I like the PHP.net community too much. Some of the programmers there are good, and I get along with them, but the majority really do not know what they’re talking about. That’s why I went ahead and set-up my own friendly, yet knowledgeable, PHP community over at TalkPHP.com. Still, PHP in my eyes beats any other web-programming language hands down! Albeit it does have some teething issues that need to be fixed - namespaces to name one!

    Adam

  19. […] mas populares y con el que me siento mas cómodo trabajando. Hoy comparto una de mis lecturas desde Krillz.com el cual hace un recuento de diez muy buenas razones para trabajar con […]

    Trinidad Servicios Informaticos » Blog Archive » Todavía no usás PHP?

  20. […] finalizar, aí vão 10 razões para usar PHP. 20 Jan 08 | Tópicos Avançados, Linguagem II - PHP + Banco + OO, Lógica de Programação, […]

    Profª Ana Carolina Jaskulski » Blog Archive » Razões para usar PHP

  21. […] Para finalizar, aí vão 10 razões para usar PHP. […]

    Blog do Anzolin » Blog Archive » Razões para usar PHP

  22. CFO Russia - , . http://www.cfo-russia.r

    CFO

Leave a Reply