4 ms·
It seems odd to me that anyone thinks PHP is "easy". The syntax is odd, as is the behavior of the built-in functions (many retain seriously warts from older ve
by grandalf 17y ago
It seems odd to me that anyone thinks PHP is "easy".
The syntax is odd, as is the behavior of the built-in functions (many retain seriously warts from older versions of PHP)
It's "easy" in the sense that you just edit one file and the webpage changes, but if that's a stumbling block for your developers then you have bigger problems.
- coliveira 17y agoIt is really easy if you already have experience with C++. Also, it is not very different from UNIX shell, and it is clearer than Perl, so I don't get why people complain so much about it.
- jrockway 17y agoEverything is easy if you have experience with C++. I fail to see how PHP is clearer than Perl. It may have fewer special characters, but everything is done with oddly-named functions that take positional arguments in an inconsistent order, return error codes instead of throwing exceptions, and randomly spew warning messages. From a language design standpoint... there is no design. Perl may not be perfect either, but the design has been flexible enough to radically modify as the community sees fit. Or rather, how you choose to modify it, as most modifications are modular and only affect a single lexical scope. Oh.
- skorgu 17y ago> everything is done with oddly-named functions that take positional arguments in an inconsistent order, return error codes instead of throwing exceptions, and randomly spew warning messages These are all anti-features for programmers who already know how to program but they're quite helpful or moot when you're a complete noob. You're going to be spending at least a third of your time in the manual so guessable function names aren't as important as findable ones, you'll be doing lots of "what the?" style debugging so verbose warnings right on the page save you one fewer step in the debugging process. Additionally it's easy to find a PHP hosting provider for peanuts, it will happily scale to moderate use without overmuch cleverness architecturally and there are literally thousands of noob-level tutorials that get you from "I want to build a website" to something that works rapidly. You don't feel the pain of the language until you're pretty far down the road but as Flickr and (obviously) Facebook have shown it's not too difficult to limit the pain and keep growing.
- grandalf 17y agoThere is just so much needless complexity and oddness, consider the way arrays contain a pointer (so that they can work like a stack) which has crazy odd behavior (which changes depending on which version of PHP you use) when you copy the array..
- robryan 17y agoPHP is "easy" because anyone can grab some code snippets, rewrite some mysql_query's and have a terrible little my first dynamic website doing in a couple of hours. Developing something on a large scale or even developing something of a normal size while maintaining good programming techniques and structure can be difficult.