Tim Bray on PHP

Tweet

Tim Bray kicked off a big blog debate on the pros and cons of PHP (see links in his post to everyone who commented). If you’ve been around PHP for a while, there’s basically nothing new here but you might find cause for optimism in how things are being said – there’s far more informed discussion happening than you might have found even two years ago.

Haven’t got anything interesting to add accept perhaps a question. Responding to Tim, a number of people made statements to the effect of “PHP is too easy. It’s all those non-programmers that are the problem!”. So we should make PHP harder to keep the non-programmers out ?!? To me there’s something deeply wrong in that thinking.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • PvZ

    Making php won’t keep the non-programmers out, especially with all the example code and already implemented sites to be found on the web. What it will do, however, is cause programmers to start writing bad code as well.

    I’ve seen this happen in c++ too often. c++ programmers look down on Java because it’s easier, but let me tell you, thinking back on some of the code I have seen “real programmers” write in c++ I sometimes wake up screaming in the middle of the night.

  • Dr Livingston

    > So we should make PHP harder to keep the non-programmers out
    > ?!?

    well… maybe not as bad as you feel i think? the general problem stems from the fact that just about anyone can pick up and learn php; hell, my 13 year old niece could use php for crying out loud :eek:

    but can she use php to its full advantage? using best practices and the elements of software engineering? of course not, and there lies the problem in my view.

    there are way too many people out there taking advantage of the good nature of php, and are outright abusing it;

    * spagetti code for example?
    * lack of proper separation of presentation from business logic?
    * etc etc

    php has brought programming to the masses and should be credited for that but its a shame for php that those masses dont understand the finer points of software development.

    so maybe a restriction – of whatever nature – would be a [great] benifit to php, after all :)

  • Jaffa The Cake

    I’d like to see all of PHP’s functionality reorganised into Ruby classes. PHP’s scripting language is a bit of a mess, time to break backward compatability and tidy it up. Obviously retain compatability for old code, but use a new processor for new code.

  • Tony

    I’ve been designing for the web for about 8 years and think all this ‘making it harder’ thing is a bit elitist, to be honest, and not what the web is all about. You should be ashamed.
    If someone wants to write spaghetti code, let them – just don’t copy it!! If someone poses as a ‘web professional’, yet does a rubbish job, they won’t last very long in the trade. simple. This is survival of the fittest, applicable to any industry or ecosystem.
    I do what I want with PHP – I know what I want to achieve, I plan it, I painstakingly put together the code (I’m not a programmer and find it very frustrating – imagine someone’s dad trying to muddle along in broken french and you get the idea), and then I get someone else to test it and review the code for me. The PHP I write is for my own sites, etc. and I’d appreciate it if you stopped campaigning to make it more difficult for me!

    Some people have difficulty reversing cars.
    Don’t campaign for smaller parking spaces!

    Rant over.

  • Constantin Baciu

    And if you stop to think about it for a while, you’ll see that the “bad rep” that PHP has in the enterprise world is because PHP is too darn easy to learn and a lot of non-PHP developpers (and, indeed, clients) are dismissing it just for that reason.

  • MaugrimTheReaper

    PHP’s scripting language is simple to learn and use. Since even your dog could probably learn enough PHP to set up a website selling kennels, it’s extremely popular. It’s easy to get fast results.

    Try getting fast results for C on Windows…

    Is there anything wrong with PHP? My opinion is not too much. It’s not perfect, but then what language is? It’s very flexible, so comparing it to Ruby-On-Rails is apples and oranges talking.

    Complaining about a language should not depend on WHO uses it – but rather HOW it can be used. Let’s not start blaming an inanimate non-sentient tool for the woes of web programming.

  • http://www.lopsica.com BerislavLopac

    The big thing with PHP is that it’s becoming too stretched for it’s own good.

    On one end we have all of its easy to learn features like server integration, procedural features, includes etc; on the other end there are advanced OOP features.

    Perhaps we need to split the beast into two: let’s have separately POP (Plain Old PHP) and POOF (PHP’s Object Oriented Fork). The former would essentially be PHP4 as it is now; the latter would be a whole new platform, with no backward compatibility, full object orientation and, of course, namespaces.

  • WebDevGuy

    think all this ‘making it harder’ thing is a bit elitist

    I have to agree with this. Why did some of you start – because it was easy to pick up – easy to learn. Should children not play with legos because some people can do extrordinary things with legos? Should I not us FREEBSD because of all the things that can wrong if not configured properly?

    There was some discussion several weeks ago about making a php that is more secure out of the box. That’s a more logical debate because you will not stop people from picking up PHP and trying it out.

  • WebDevGuy

    let’s have separately POP (Plain Old PHP) and POOF (PHP’s Object Oriented Fork)

    Is this why the adoption PHP5 (essentially a “POOF”) is not what it was thought to become?

  • http://www.phppatterns.com HarryF

    hell, my 13 year old niece could use php for crying out loud

    Since even your dog could probably learn enough PHP to set up a website selling kennels, it’s extremely popular. It’s easy to get fast results.

    Slap me but I think this is a really good thing! That real people can get real things done with PHP is fantastic.

    And sure – the reality is PHP also helps them shoot themselves in the foot (paw) and there I’d say PHP (or some future language, realistically) can do a better job, but by making things easier, smart defaults etc.

  • Jasons

    Is PHP really that easy, or is it the fact that there are tons and tons of tutorials, code, and other resources on the internet for people to learn from?

  • http://www.lopsica.com BerislavLopac

    Is PHP really that easy [...] ?

    Actually, the most important thing is that it’s easy to implement. Once you have it installed, and 99% of Linux shared hosting does, it’s just as easy as HTML: write some code, upload by FTP, view in browser. There is no “build site” scripts and commands, custom Web servers etc — you have full control, which is extremely important for a beginner.

  • http://www.yukonbiz.com Geof Harries

    I agree with Harry. It’s exciting that young kids can write PHP – a low barrier to entry is a healthy thing. I doubt many 13 yr. olds are putting together Java apps, C++ or writing in asp.net. PHP enables them to experiment, share and learn, which is what will fuel future generations of professional programmers.

  • Constantin Baciu

    Slap me but I think this is a really good thing! That real people can get real things done with PHP is fantastic.

    Well.. I do agree with that. In fact, I remember that Andi and Zeev had a “simple can be better” ideea in mind when they had the first PHP release…
    I remember that Marco had a project for “bringing PHP in the in the enterprise market” lobby. Does anybody know the status of that project?

  • Constantin Baciu

    Ohh.. Forgot one thing that would help my view:

    http://blogs.phparch.com/mt/?p=125

    It’s an interesting read.

  • Ren

    I too think the low entry into PHP development is good.

    There are problems, sure, beginners learning from poor quality articles for instance. Beginners should be encouraged to use existing code as much as possible, weither it be a collection of libraries or a complete framework. Thus hopefully preventing them from falling into any pitfalls of PHP has and of software development in general, atleast until they become proficient enough.

  • jackreacher

    Making Php EASIER is the key. By that I just mean more of what the excellent Php community is already doing. More abstraction components that allow for easier extensibility, etc (looking forward to checking out the new Zend Framework). Seriously, if you really want to see elitist at its finest you should talk to my .NET friends when they brag about drag & drop components as they begin throwing around “open source” as a curse word.

  • http://timvw.madoka.be timvw

    I’ve said it many times before… And i’ll repeat it once more:

    “PHP is Visual Basic for the web”

  • http://www.napathon.net/ vinyl-junkie

    Some programming languages, just by their very nature, lend themselves better than others to “writing good code,” and that is irrespective of how easy they are to learn. However, I’ve noticed one consistency throughout the many languages I’ve learned in my programming career: You can write bad code in ANY programming language. Is that the fault of the language or the person who codes it? Yes, PHP is easy to learn, but you get out of it what you put into it.

  • http://www.lopsica.com BerislavLopac

    you get out of it what you put into it

    Ah, the well-known principle, also famous as GIGO. :)

  • http://www.jonhehir.com Young Twig

    hell, my 13 year old niece could use php for crying out loud :eek:

    but can she use php to its full advantage? using best practices and the elements of software engineering? of course not

    That’s only because she’s a girl.

    jk, folks.

  • Anonymous

    PHP is Visual Basic for the web

    Regarding that quote, if you mean it’s easy to use, true. However, I have stated here and on other blogs, if PHP were to adopt ONE framework that was generally accepted as the de facto framework, then it might be on it’s way to being “PHP is Visual Basic for the web”. VB, IMHO, got to be as popular as it did was because it had ONE standard way of working with it.

    Sure you can write .Net in Notepad, but name me someone who does in a professional business setting and I’ll show you someone who is not charging enough for their products.

    When the PHP community adopts ONE framework as the de facto way of working with PHP, THEN it will be like “Visual Basic for the web.”

  • Gator99

    PHP is what it is, a scripting language. It’s the best web RAD available. It’s for 2-tier application development. But of course you can use some contrived template system with a syntax of it’s own and call it 3-tier.

  • bjcffnet

    hell, my 13 year old niece could use php for crying out loud :eek:

    but can she use php to its full advantage? using best practices and the elements of software engineering?

    What about your 13 year old nephew? That’s when I started learning PHP, and while I wrote crappy code in the first few months of coding, I started writing better and better code. Now, at 14, I’m starting to get into OOP, and I actually came here looking for to get into design patterns and such.

    White it’s entirely possible for a 13 year old to write horrible code with a 20-30 year old writing great code, it’s completely possible to be the other way around.

  • Peter

    And yey for 13-year old programmers. You know damn well they will kick your coding ass in 2-3 years time, so don’t patronize them.

  • Anonymous

    “Is this why the adoption PHP5 (essentially a ‘POOF’) is not what it was thought to become?”

    I think the main problem with php5 adoption is – It took to long to get to php5. Back in 2001 when Zend announced their plans for ZE 2.0 everybody was excited – wow! real OO & stuff, now we can do real object design in our app, just like the big guys who use java! I downloaded the cvs builds and though – this is cool, all these new features. I can do this and do that. I wish I could use it for production apps right now :(

    4 years later… php 5.0.0 was out. 4 YEARS!!! Well maybe 3 years – but it’s a hell lot of time anyway, especially on the ever-changing internet.
    Who had to write their applications in php – they did it with php4. Porting to php5 won’t give any real advantages – if you want to use php5’s new OO features you have to design you app from scratch. And if you want to do something from scratch – there are much better options for this. You can do it in python or ruby and use all the features modern programming languages have to offer.

    I know php has a huge userbase and you can write good code in it – but why then the smartest php developers, who are able to write good php code are leaving for ruby and python camps, inventing rails, tirbogears, django, whatever and swearing to never use php again?

    c’mon guys – honestly, is there a future for a language that in 2006 tries to mimic java syntax from mid-90th and doesn’t attract the brightest hackers anymore?

  • Chris

    Hey, it doesn’t have to be an either/or thing. Do the app code in Perl/Catalyst, and use PHP as the view for templating. :-)

  • baron.pampa

    the anonymous php rant was mine.

    “Do the app code in Perl/Catalyst, and use PHP as the view for templating.” – and what’s the point?
    Catalyst (and any other MVC framework) has it’s own view/templates. And they will fit better with their native framework than php

  • Chris L

    It would help matters immensely if there were more materials in two areas:

    1) PHP for “real” programmers that showed how to use the language “properly” from the perspective of a knowledgeable programmer in Java, C, etc

    2) PHP resources that help intermediate users who have been using PHP for a while but are often largely/completely self-taught and have never been exposed to professional practices and/or frameworks

    Most PHP books fall squarely in the middle– for the intermediate they are repetitive without a clue how to be more professional, for the advanced user in another language they are useless because they aren’t deep enough.

  • http://blog.casey-sweat.us/ sweatje

    It would help matters immensely if there were more materials in two areas:

    1) PHP for “real” programmers that showed how to use the language “properly” from the perspective of a knowledgeable programmer in Java, C, etc

    2) PHP resources that help intermediate users who have been using PHP for a while but are often largely/completely self-taught and have never been exposed to professional practices and/or frameworks

    Most PHP books fall squarely in the middle— for the intermediate they are repetitive without a clue how to be more professional, for the advanced user in another language they are useless because they aren’t deep enough.

    At risk of blatant self promotion, see Harry’s review of my book:
    http://www.phppatterns.com/docs/reviews/guide_to_php_design_patterns

  • Christopher Thompson

    It is amazing that an article from some guy who works at Sun (of all places) can make the highly meaningless (and a little pathetic) statement that PHP: “in the big picture, it feels vulnerable to me.” What does that even mean?!?

    I am sure he is a smart guy, but does he really have a grasp of the current complexity in development trends. These guys are still talking about good code and bad code like the world is just like the offices of those tech companies of 20-30 years ago. Good programming used to be what would get you the highest salary. Those days have come and gone … and Sun of all companies should know the days of selling high priced sand are long past.

    Can we get some inciteful commentary on the new poly-culture that is now software development … that includes all those thousands and thousands of crappy PHP programmers that seem to be ruining programming for the “technorati.”

  • LinhGB

    So here’s my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I’ve seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places.

    Based on his limited experience with PHP, and he doesn’t even tell us which free PHP apps he was looking at? We’re supposed to take him seriously?

    I mean, I’ve never seen a poorly written Java app/JSP site ever. Like that wonderful Vodafone JSP site that I use for my mobile which fks up every 2nd day (right now I can’t even top up my prepaid account). /rant

  • WarpNacelle

    If it wasn’t for PHP and how “easy” it is, I would be left out in the cold on the doorstep of dynamic website.

  • agreed

    Agreed with Harry.

    Programming languages are developed so HUMANS can COMMUNICATE to COMPUTERS.

    They should all be easy.

  • mipapage

    “PHP is too easy. It’s all those non-programmers that are the problem!”. So we should make PHP harder to keep the non-programmers out ?!?

    I have no idea what makes you ask that question – there is no motivation for it. For the record, I most certainly wasn’t suggesting that in my response to Tim.

  • http://www.silentflute.co.uk worchyld

    Isn’t the whole point of programming to make mundane tasks easier to do, not harder?

    I’d like PHP to move to more security concous way, move as close to Ruby on Rails as possible (but still make it understandable and, unlike RoR, easy to install on windows, etc) and then make sure hosts take it up, unlike PHP5, add some more features that the more advanced PHP cliques want and your done.

  • Anonymous


  • WebDevGuy

    I think people are leaving for other languages, if indeed they are, is the structured framework offered in something like Rails (Ruby). (I’m the anonymous who talked about needing a framework.[When the PHP community adopts ONE framework as the de facto way of working with PHP, THEN it will be like "Visual Basic for the web."])

    Rails is a framework everyone is rallying behind. One framework, not the 5-10 valid PHP frameworks all vying for PHP guru’s attention and write-ups.

    I am very hopeful that the Zend framework will be that one. For if it is not, I think you start seeing an serious migration to other languages. And I am saying this a huge PHP fan, not as a technology prognosticator. I would truly hate to see it, but I think it will happen it we don’t rally behind one framework that suits most purposes. AND perhaps most importantly, that framework must explicitly configured for security. Leaving newbies, like we all were at some point, a little more protected than they are now trying to learn and read from tutorials all over the web.

    Again to summarize, a thousand points of light and ONE PHP framework. :-)

  • anon

    i know that people are fanatic about rails, but after looking at rails, probably the biggest turn off was how it handled creating html by using tags with methods/functions in the html. can we say gross? thats no better than smarty.

    if you want to make php easier, make a decent, simple template solution with tags like or something to that effect.

    i would think this is one of the ways that so many people fall into the trap of writing bad code is where they mix php with html.

  • Pingback: SitePoint Blogs » A pro-PHP Rant

  • http://www.lopsica.com BerislavLopac

    I’m already tired of repeating this, but I’ll do it again: PHP does not need a “single” framework!

    Why? Because PHP is a framework. PHP is not a language; languages are designed, which PHP definitely wasn’t — it kinda grew organically around a basic set of features. Instead, PHP was intended as a Web development framework, and that is what it remained to this day.

    Oh, don’t get me wrong — PHP includes a scripting language, with quite a powerful syntax in later versions, but it’s definitely not a fully fledged language.

    And this ambiguity is exactly what causes most confusion with insiders and outsiders alike. The two aspects of PHP pull in different directions, and the developers are turning into modern Guelphs and Ghibellines over that issue. And nobody’s winning — if we go the language way, we’re losing the great Web integration features and ease of implementation, not to mention backward compatibility; if we go the framework way, all of these nifty OOP features are redundant and unnecessary.

    I am not wise enough to know the answer to this.

  • deus ex machina

    sure theres tons of crap code out there. Is that PHPs fault?

    Personally I have a nice MVC type architecture going here. A DB API that can easily be reconfigured for a different type of DB. All my models spitting XML. And a nice output layer that mashes the XML with the XSL views.

    Maybe this dude is just a bad developer

  • WebDevGuy

    Maybe framework is the term of the day and I am using it incorrectly, not being an insider.

    What I mean is a user above mentioned that PHP is the VB for the web. What I am saying is that it will NEVER be like VB for the web (.Net) UNTIL it has the sibgle focus of .Net which is ONE clearly defined and de facto framework (the new framework at Zend is calling it that, not me) with all the troops rallying around. And I’m not saying Zend will be it but ONE will or should be IT – whatever IT is.

    If instead, 10 groups within the php guru ether decide to keep touting their framework as the best, we will NEVER have concensus and developers will seek greener pastures where is such such an hand-hewned framework (sorry to mix my metaphors).

    Again, let it be stated that I AM a php fan. But when I was coming along, I struggled with these issues and I had a fre licensed version of MS Dev Studio and still chose to use php, although there were times I thought seriously about switching fo rthe reason I state above.

  • http://www.lopsica.com BerislavLopac

    If instead, 10 groups within the php guru ether decide to keep touting their framework as the best, we will NEVER have concensus and developers will seek greener pastures where is such such an hand-hewned framework (sorry to mix my metaphors).

    I don’t think you understand it, WDG. The reason there is so many PHP frameworks is not because (OK, not only because) of each groups egos — it is so beause it’s so easy to make such a framework. Primarily because half of the work — integration in environment — has already been done. Other platforms also have numerous frameworks — Java, Python (and that link doesn’t even cover Django and Turbogears), and even Ruby.

    Search for “the ultimate Web framework” is futile — no matter how good you frame your work, two facts remain: a) there will always be a better, or at least more appropriate to a situation, way to do something, and b) not everyone will share your opinion on the most optimal solution. And that’s why we don’t have a single religion, or a single shoe supplier — competition is a good thing.

  • WebDevGuy

    And that’s why we don’t have a single religion, or a single shoe supplier—competition is a good thing.

    I understand your reasoning and agree with it. And I understand what you mean by PHP being a “framework”, I don’t agree it’s the same meaning I am using here. .Net is a framework and Dev Studio is the tool used. It’s possible but unwieldy to develop .Net using Notepad.

    However, my statement stands – if your scenario plays out then developers, particularly new developers, will seek greener pastures with a single de facto framework that is safe for noobies to use and has LOADS of examples, tutorials.

    As an example, and I know this is not necessarily a fair one but since someone else brought it up, VB for the net. Let’s call it .Net. There are so many examples of ANYTHING you could want to implement as a new developer, it would be no problem finding one, with detailed explanations of why it works the way it does, and that’s just at MS site.

    The reason? Profit is a huge part – absolutely. However, it’s also focus. .Net is focused on ONE tool/framework with which to develop.

    Ruby on Rails has garnered its share of attention. The reason? Rails – a single framework that makes it easy to start many types of projects. Soon there will be 1000’s of examples detailing most anything a new developer would want to know about Rails. Without Rails, just another language waiting for a single focused framework.

    These examples are taken a little to the extreme, but you get my point.

  • http://www.lopsica.com BerislavLopac

    .NET is definitely not a Web development framework, which is what we’re talking about here. Like J2EE which it was modelled after (only with a wider choice of languages), .NET is a hammer that comes accompanied with a pair of glasses that make everything look like a nail. It’s trying to make Web development look like traditional desktop development — but the Law of Leaky Abstractions is waiting in the murky waters below.

  • http://www.lopsica.com BerislavLopac

    One more thing: neither .NET nor Rails are the only frameworks (I’m still on the topic of Web development here) for their respective languages (for .NET that means all the languages supported by ASP.NET). They’re just the ones we hear most about, especially Rails which is hyped up much above its actual quality.

  • http://www.phppatterns.com HarryF

    I’m already tired of repeating this, but I’ll do it again: PHP does not need a “single” framework!

    Why? Because PHP is a framework. PHP is not a language; languages are designed, which PHP definitely wasn’t—it kinda grew organically around a basic set of features. Instead, PHP was intended as a Web development framework, and that is what it remained to this day.

    Personally agree – it’s a framework. At the same time, as a framework, it doesn’t offer enough by default – Zend and their framework could have value here in supplying the missing pieces.

  • http://www.lopsica.com BerislavLopac

    as a framework, it doesn’t offer enough by default

    Doesn’t it? What is enough, really? PHP makes it possible to create critical Web applications — for a Web development framework, that’s plenty enough.

  • Anonymous

    My current top 3 list for PHP:

    – We need namespaces, if merely for organization’s sake.

    – We need native Unicode support. mb_string does not count.

    – We need to shoot whoever named htmlspecialchars(). People don’t use it because it’s ABSURDLY LONG. Rails got this one right: h().

  • http://loadaveragezero.com/ dwclifton

    function h($s, $q = ENT_COMPAT, $c = 'ISO-8859-1') {
    return htmlspecialchars($s, $q, $c);
    }

  • http://www.phppatterns.com HarryF

    Doesn’t it? What is enough, really? PHP makes it possible to create critical Web applications—for a Web development framework, that’s plenty enough.

    OK – “enough” is subjective but, for one trivial example, I have found value in some form libraries written in PHP, which make validation easy and take care of hooking that up with error reporting. Really that’s a library thing – it doesn’t need another framework.

    The point is PHP stops at a point that leads to people inventing the same wheels (libraries) over and over.

  • http://www.lopsica.com BerislavLopac

    Really that’s a library thing—it doesn’t need another framework.

    Bingo. And that’s my point exactly all the time.

    PEAR was supposed to be one such library, but due to less than perfect execution as well as limitations of PHP (namely lack of namespaces), it failed to become the universal repository it was supposed to be.

    In fact, the best proof of the dual nature of PHP (framework and language) is the fact that there are two code repositories for it: PEAR and PECL. Both of them implement functions, classes and other features that are available from PHP, but one implements them in PHP, and the other in C.

  • Anonymous

    function h($s, $q = ENT_COMPAT, $c = ‘ISO-8859-1′) {
    return htmlspecialchars($s, $q, $c);
    }

    Missing the point. Sensible defaults are always better.

  • Anonymous

    So we should make PHP harder to keep the non-programmers out ?!? To me there’s something deeply wrong in that thinking.

    I couldn’t agree more. There is a lot of high-quality open-source PHP code out there, and it’s easy to find. Wikipedia is running on top of it, and Yahoo! swears by it–that’s proof-positive of the potential for high-quality development with PHP.

    And it seems strange to me that a truly experienced programmer would complain about the low quality of some PHP code (as if there’s not a good degree of low-quality Java, C++, Perl, etc. code), as if they don’t have the ability to separate wheat from chaff. I just say “boo hoo hoo” to these lazy programmers.

    Yes, the ease of picking up the basics of PHP doesn’t turn somebody into a professional programmer overnight, but if a true professional doesn’t know where to find top-notch reusable PHP code, then they simply aren’t looking.

  • http://loadaveragezero.com/ dwclifton

    Missing the point. Sensible defaults are always better.

    Point? It was a weak stab at humor.

  • WebDevGuy

    This is an example of industry heavy-weights taking on what I proposed earlier – make security part of the framework.

    The big push just starting to get some press now is to make security built in, NOT an afterthought. Not left up to the programmer to decide. Built-in.

  • Andrew

    Look I am in a shop with a number of PL/SQL and Java programmers, and I consistently develop a quick working (and maybe dirty) solution to most of our web applications problems in PHP, way before the other guys. I am not a better programmer, I just choose to use a tool (PHP) that is doing what it was designed to do – Web based programming.
    Want to bang a nail?… use a hammer not a saw!
    PHP’s biggest success is its power and versatility within the web environment. Just coz it is easy to use does not mean it is shallow or superfluous. It just means it is the best tool for the job.

  • ChrisConn

    BerislovLopac wrote
    Oh, don’t get me wrong—PHP includes a scripting language, with quite a powerful syntax in later versions, but it’s definitely not a fully fledged language.

    Well then define what a language is.
    My personal opinion is that a language is merely a way for one person to communicate with another person or thing.
    Every programming language that exists today serves a purpose that it was designed for, and typically is expanded to broaden it’s appeal.
    Someone I knew once said that I wasn’t doing “real programming” because I was coding in MapBasic. Well, what is real programming? One can go from microcode, to assembly, and all the way up to the scripting languages that we have today. As a matter of fact, one can do molecular coding now (OK not everyone) :)
    So tell me what a real programming is, and also what a real language (ok your words were full-fleged language) is?

  • http://www.lopsica.com BerislavLopac

    So tell me what a real programming is, and also what a real language (ok your words were full-fleged language) is?

    And this is the important difference: “real” and “fully-fledged” are orthogonal. I actually should have phrased it differently: PHP as a language currently has only one implementation (OK, two: CGI and CLI), and it’s quite limited in scope: you can’t keep your objects in memory, for example.

    This doesn’t mean that PHP is not a real programming language; it just means that it is (currently) limited in its scope.

  • Anonymous

    I may be missing the whole point of this discussion, and if so, please accept my apologies. This is just the opinion from one the huddled masses who are not “professional” programmers.
    The closest I have been to programming was years ago in high school using BASIC on an Apple II and a bit of HTML here and there since then.
    We took a foray into the world of e-commerce (a dismal failure for reasons not applicable here) and chose a platform using PHP/MySql, which led to integrating a PHP/MySql CMS for an online group, due to the theoretical simplicity with which a “non-professional” could utilize them.
    We looked at other options (PEARL, ASP, ect.), and I could not seem to wrap my brain around them (Which was my fault, not the frameworks).
    Had PHP not been “easier”, we would never have been able to sort out the mess created by the “professional” programmers who were touting their work and receiving rave reviews from other “professional” programmers, while most of the required fixes were done by those who were not “professional”.
    So the idea of making something harder to keep out those who are not “professional” seems, IMHO, a bunch of garbage from those who desire the appearance of competency through obfuscation.

  • Adil

    I started learning PHP on the first day of my job. It was pretty much procedural then. But six months on, i solve all my PHP challenges using OO principles.

    PHP is easy to learn and gives you room to grow. The idea of making it harder to get good code is baseless. You can write bad code if you want to, and you only get better when you FEEL how bad your code really was ( 1 month into maintenance).

  • WayneM

    I am inclined to agree – I never bothered to learn PHP because every book that I saw about it was all spaghetti code and how to quickly hack together garbage; not one I have seen actually showed proper design practices and how to use them, it was all for the “script kiddie” types and stunk of Classic ASP. The few open-source things (phpBB, WordPress) that I’ve looked at to try and customize were cesspits of code hacked together, with tons of includes and random-looking pages that didn’t do anything but call other pages. It was a nightmare. Maybe if there were some decent books geared towards using PHP as a competent professional and not as a hack, the language wouldn’t have such a bum rep.