I thought I posted this before but its gone miraculously missing. Lets see if it gets removed again.

I've seen much debate on forums and news sites about PHP's status as a programming language. Most non-PHP developers bag PHP for being a mere scripting language. And yet thousands of PHP developers out there would likely disagree.

PHP's come a long way since its days as a tool for measuring webpage traffic. Tons of advanced, complete, online and offline applications being developed in PHP seem to indicated that its evolved into a fully fledged programming language, and with the further object oriented functionality built into PHP5 this status seems sealed.

So what are your opinions (Probably preaching to the converted here, but anyway)

Scripting language or Programming language ?

    What's the difference anyway? They're only words.

    Anything is proper programming, if done right. It is true that a lot of the mindset of some PHP developers, is that PHP is for making little throw-away "scripts" which are often copied & pasted without any thought, and have no dependencies.

    But this is not the right way of using PHP, and I refer to a PHP application as a PHP "application". Just because it's written in PHP doesn't mean it's not a proper application which has its own requirements for maintenance, documentation and setup etc.

    Clearly these days with the likes of AJAX, XUL, etc, the distinction between a desktop app and a web app are being blurred a lot. I could write a XUL app with a PHP backend and distribute it to desktop clients, and they would not know it wasn't written in a native-compiled language.

    Mark

      The two are not mutually exclusive. PHP is a scripted programming language.

        The distinction was dreamed up by ... um... forget his name right now ... invented tcl.... anyway, making some silly little technical distinction that doesn't seem to be worth worrying about. I certainly don't see what the point of making the distinction is supposed to be.

          Well, php.net introduces PHP as "a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML". We often talk about PHP scripts rather than PHP programs.

          On that note, I would describe PHP as a scripting language, but only to be consistent with its official description. I think that any rules to distinguish between a 'scripting language' and a 'programming language' is bound to be arbitrary and contain loopholes somewhere, since we deal with a continuum of languages and language features.

          The distinction was dreamed up by ... um... forget his name right now ... invented tcl....

          John Ousterhout, as in Ousterhout's dichotomy?

            Weedpacket wrote:

            The distinction was dreamed up by ... um... forget his name right now ... invented tcl.... anyway, making some silly little technical distinction that doesn't seem to be worth worrying about. I certainly don't see what the point of making the distinction is supposed to be.

            I disagree. It's needed to explain the differences to some people. e.g. clients.

              laserlight wrote:

              John Ousterhout, as in Ousterhout's dichotomy?

              Yup, that's the guy.

                It's needed to explain the differences to some people. e.g. clients.

                Unfortunately even agreeing on what the differences are in the first place is a problem. How can we explain to clients what we dont quite agree on in the first place, unless we explain so much that it becomes useless to have the differences encapsulated in two terms?

                Or, we only give our opinion, and the client gets confused when another developer provides another opinion.

                EDIT:
                Just noticed...

                Jason Batten
                forever learning...

                Jason Batten's Avatar

                Join Date: Mar 2005
                Location: Perth, Australia
                Posts: 666

                run!!! 🙂

                  I take back what I said before.

                  You should never be explaining that stuff to clients. Why would you be? lol

                  Let me think of a more worthy reply... *puts on his horns :evilgrin: & has a think

                    why would you talk to your clients in techno babble anyways? You talk to them in ways they can understand; usually this means business babble. Unless you client is a programmer or tech geek, there really isn't much point in speaking a foreign language to them.

                      Exactly, hence my "taking back" of the comment.

                      Although it depends on your clients. E.g. My primary client is not the average "Joe Shmoe".

                      For some reason, some people tend to see "scripting language" as a degrading term. I don't see it that way, just as a definition of the languages "limitations"?

                      I wish to back down and away from this topic before someone with more programming knowledge and experience kicks my arse runs away flailing his arms in the air

                        I think someone needs to explain all this to the ASP/JSP/C++/C# etc programmers who see PHP as a "lesser" language. Just take a look at any PHP story on slashdot for evidence (mind you - everything on slashdot is like this. That site brings out the worst in fanboyism. Fanboys of any persuasion make me sick).

                        As with anything, PHP is just a tool. I've seen poorly written systems in all languages. The quality of a system is down to the skills of the programmer (at least thats what I tell the boss when trying to justify another pay rise 😛)

                          I think someone needs to explain all this to the ASP/JSP/C++/C# etc programmers who see PHP as a "lesser" language

                          Don't worry, even paranoids sometime have "real" enemies 🙂

                          I am primarily a windows programmer, and I hate to tell you, there is little to no "anti-php" noise in any windows developer forums. Extremely vocal advocacy is much more prevalent in the OS world.

                          I do both worlds, and I like PHP and I like ASP and I like VB. They are all pretty good tools to get stuff done.

                            Just to be clear. ASP is not a language, it is a framework used by scripting languages (vbscript, jscript, python) to build web applications. ASP.NET is also a framework not a language, supporting the C#, and VB.NET languages.

                            Bit of subject but pff.

                              And now I think .net supports real languages, like PHP! haha, just kidding (about the real languages part, not the .net supporting it).

                              I always figured, if your vars have $ in front of them you're like using a scripting language.

                              OTOH, I've yet to meet the REAL language that handles mixed (numeric / text indexed), unbalanced arrays like php does. It seems weird and goofy at first, but a lot of data structures are naturally pretty danged goofy too.

                              I love to watch a Java or Perl develop while you explain how an LDAP object that is returned as an array is put together. It's fun to watch people's head asplode (figuratively, of course) when they first encounter that particular bit of weirdness.

                                Just to be clear. ASP is not a language, it is a framework used by scripting languages (vbscript, jscript, python) to build web applications. ASP.NET is also a framework not a language, supporting the C#, and VB.NET languages.

                                And PHP is a framework used by the php scripting language.

                                Conceptually asp and php are pretty much the same. PHP relies more on functions built in the php language, ASP relies more on extensible components from outside sources.

                                  Actually, PHP has several real frameworks available for it. One of the more interesting ones is greenorange which is a framework and an IDE via web interface all rolled into one.

                                  I would actually say that php can be used to build its own framework, but PHP in and of itself is kinda a half-framework, considering all the external packages it can incorporate, like libdb, url wrappers, ldap interface, PDO db interface etc...

                                  But a framework generally includes larger things like form builders and such.

                                    I just visited the greenorange site. Oops, I can't even look at the documentation without registering first, and I don't intend to register on a site when I don't have a clue what it's about.

                                      That's only the overview doc, and I'm not sure why they implemented that. It wasn't there before. the technical docs which tell you how to actually use it, are free and open.

                                      I'm willing to be this had something to do about people spamming comments or something.

                                      Note that it is licensed GPL...

                                        I always figured, if your vars have $ in front of them you're like using a scripting language.

                                        I propose that PHP6 use variables that start with a ! so as to make it a Real Programming Language.

                                        if ($isset(!_GET['foo'])) {
                                        	echo "empty";
                                        } else {
                                        	echo (!_GET['foo'] == 0) ! "nothing" : "something";
                                        }