|
|||
|
Update 2004-07-15: PHP5 was released the other day, so anything on this page is out of date until further notice. Of course many sites will still be using PHP4 for quite some time. Feel free to post comments about what the PHP guys have and have not fixed in 5, and what new annoyances or features they 've added. PHP AnnoyancesDisclaimer: I've written a fair whack of PHP now and having a background of Java, C and (most importantly) Perl, I feel justified having a bit of a rant. If I've got the wrong end of the stick on anything, or if I've got the wrong stick entirely let me know! Likewise, feel free to inform me of other irksome issues I haven't bumped into yet. I do basically like PHP, but I wish these things weren't true:
Hello. Lookee, comments on articles now. Posted by david at 2002-11-27 16:00:18: Hello, i have never felt inclined to use PHP. i have not been stopped from doing anything i want using: jsp, servlets, beans, usebeans, applets, rmi, html, javascript, c (cgi-bin) and yes even some perl (though, i don‘t have a log of dev w/ perl). as mentioned i don‘t have the time or inclination to use PHP but if u could give some advantages over the technologies i just mentioned i would gladly turn my attention to PHP. thanx, david. Posted by Link at 2003-05-10 13:34:09: You know what, I agree with you. For people who started with C, C++, Java, PHP does appear to be a bit strange. I see PHP as the web backend equivalent as VB. Good for quick prototyping and nothing too complicated or mission critical. Sometimes I am forced to write PHP to prototype because my web hosting company does not support servlet yet. Given a chance I ran back to writing servlets. Posted by cfreak at 2003-06-09 22:55:59: Thank you thank you thank you!!! I‘m going to link this page everywhere I can. You summed up everything I‘ve been saying about PHP for years very nicely Posted by N3d at 2003-06-10 09:39:27: Glad you liked it. From the name I‘m guessing you‘re a CF freak :-) (or is that "C-Freak" as in actual C?) Posted by Josh A. at 2003-08-19 06:15:53: You are cah-razy. And the best thing about PHP is its documentation. I program in Perl too, when I have to, and it‘s so freakin‘ hard to find useful info on the web. The signal-I‘m-looking-for to that-noise-you-call-Perl-content ratio is piss poor. Posted by Jon at 2003-08-26 20:55:22: erm, ‘perldoc perl‘? Posted by Jon at 2003-08-26 20:58:23: Sorry, perhaps thats not useful. PHP‘s documentation is very good indeed, and the perl documentation is a little harder to navigate properly, from my experience. Here‘s a new annoyance for you: inconsistent function names, e.g. mysql_connect but mysql_close rather than disconnect. Anonymous comment at 2003-08-31 08:02:35: honestly, php is created by a bunch of shitheads. it‘s a poorly designed hacked up language, and that‘s that. Anyway, just like to point out that point 15 is incorrect. To get char in index 3 from string str, use curly braces: $str{3}. I would also like to say that the documentation is very good -- even though the language really really sucks. Anonymous comment at 2003-09-01 09:45:00: http://www.perl.org/ --- for all your Perl needs. Note the online documentation section. Anyone who thinks perl‘s docs are substandard or hard to navigate is just trying to be obtuse. Posted by Floatybunny at 2003-09-16 05:53:29: just try using ORACLE from PHP, that is an exercise in frustration ... Posted by Brain at 2003-10-06 12:57:25: Quoted by Jon: "Here‘s a new annoyance for you: inconsistent function names, e.g. mysql_connect but mysql_close rather than disconnect." This appears to be because the mysql C/C++ functions (exported from its lib and headers) are mysql_connect and mysql_close, it appears whichever person added mysql support to php back in the depths of time just copied the function names. Which leads me to my own personal annoyance, why are all the variable names named differently, some are this2this, some are this_to_this, and others are ThisToThis :-) Posted by fuck you at 2003-10-21 16:53:21: lol my car wont drive on the water lol im a stupid faggot Anonymous comment at 2003-11-13 14:39:34: Not sure what your idea is about references, but how about this: http://www.php.net/references Anonymous comment at 2003-11-13 14:41:36: 8. globals Use $GLOBALS[] Posted by N3d at 2003-11-13 14:43:14: From the URL you posted: (regarding pointers) They are not like C pointers, they are symbol table aliases. And that‘s the problem. Posted by N3d at 2003-11-13 14:44:34: Re: $GLOBALS[] Importing globals is messy. You‘ll notice that I do say above "...except by importation". If PHP had real namespaces (and I belive that PHP5 will) it wouldn‘t be necessary. Posted by N3d at 2003-11-13 14:48:08: ...but thanks for reading my site :) Anonymous comment at 2003-11-28 17:35:55: namespaces were taken out of php 5, for the initial release, at least. Posted by kemokid at 2003-12-04 06:38:13: PHP really, really sucks ass. My major annoyances: 1. No namespaces. 2. Really, no namespaces. Unbelievable. 3. The developers of PHP act with a cavalier disregard for backwards compatibility. Lots of APIs change with a major revision number change; some APIs even change across minor revs. 4. Even though it was written specifically for the web, its string quoting system sucks for HTML. Single quotes won‘t evaluate embedded variables; double quotes will but then you need to backslash all your "real" double quotes - which are extremely common in HTML. 5. Even though it was written specifically for the web, its CGI support sucks. Supporting <SELECT MULTIPLE> requires your own code to parse QUERY_STRING, and can only be done under GET, not POST. Sound unbelievable? It is. 6. Language design encourages mixing of presentation and logic. This only counts as half an annoyance, because it‘s an understood problem for the niche PHP is trying to fill. 7. PHP‘s arrays are hashes concept is really confusing even to experienced programmers. There‘s all sorts of hidden gotchas. That, and array + doesn‘t work, and no decent array splicing syntax. 8. ===/== crap. Check out this bug, especially the fact that the PHP developers DON‘T CONSIDER IT A BUG and refuse to change it: "Does PHP think i am stupid and unable to type numbers when i want them?" http://bugs.php.net/bug.php?id=23110 Posted by N3d at 2003-12-04 12:50:52: Thanks, kemokid. I‘ll update he list sometime soon and include your points, especially 1 and 2 :) Anonymous comment at 2003-12-11 04:42:32: my biggest complaint about php no soap implementation! Posted by Sgt. Hartmann at 2003-12-15 19:21:42: PHP is good for non crucial projects and programmers with low expertise. Posted by Whugstre at 2004-01-14 11:28:31: Point #6 also happens to some of the other popular languages. I am currently using .NET for most of my work and all the of the community sites are like story books. Posted by Justin at 2004-01-20 02:23:57: kemokid: You can do the select-multiple thing with no problems in PHP by adding brackets to the end of the input name -- then PHP will bring it in as an array. Ugly, but it generally works. Also, there‘s a here-doc syntax that lets you interpolate vars without having to quote the double quotes. (Just like Perl does.) As for most of the rest of the stuff from both the lists, I agree. PHP makes it quite difficult to program in a standard efficient manner, but it also can make simple things pretty quick to do. I‘ve had to code a bunch of libraries to handle the form and database stuff for me, but now it‘s pretty tolerable. Once you start using OOP, the namespace stuff isn‘t nearly as much of an issue -- but the lack of pointers is. (And the alias-reference method doesn‘t allow circular references, which is pretty limiting.) The biggest problem? #14. PEAR doesn‘t come remotely close to even attempting the kind of ease and functionality you get with CPAN. Not to mention a near-complete lack of documentation (of PEAR "modules") and no way to get info on ‘em before you download them. All that, and yet, I still use PHP for everything I do at work. Go figure. It‘s a lot easier to mix into stuff that non-programmers are working on. Posted by PHP Coder at 2004-02-01 22:23:04: "Supporting <SELECT MULTIPLE> requires your own code to parse QUERY_STRING, and can only be done under GET, not POST. Sound unbelievable? It is." It‘s also WRONG. Duhhhh. Probably would be better if you checked into your claims before making them. Name your mutliple select like this: <select name="stupidity[]"> and it passes an array, even using POST. Anonymous comment at 2004-02-08 16:02:47: ‘I program in Perl too, when I have to, and it‘s so freakin‘ hard to find useful info on the web.‘ Sure, it‘s really hard to go to http://www.perldoc.com and clikc on the links ‘POD‘ or type perldoc -f name on command line or to type man perlfunc. Not to mention the documentation of the modules which are all listed on CPAN, nor the many maillinglists (http://lists.cpan.org). Perl documentation is good. I haven‘t had any problem finding good information. ‘Probably would be better if you checked into your claims before making them. Name your mutliple select like this: <select name="stupidity[]"> and it passes an array, even using POST.‘ Now that is stupid. So PHP is forcing you to use some kind of name outside PHP. Posted by p3 at 2004-02-12 13:31:38: Total stupidity is [] on forms, what they cant build a hash of hash when parsing the post, so all my html templates have to changed just for php, give me a break. Oh and you have to chnage ya csjs so it can deal with [] argh! Posted by Anonymous Coward at 2004-02-13 23:11:50: "near-complete lack of documentation (of PEAR "modules") and no way to get info m before you download them." http://pear.php.net - very hard to get info on them, huh ? Also: $ pear remote-info XML_Tree Package details: ================ Latest 2.0b2 Installed - no - Package XML_Tree License PHP Category XML Summary Represent XML data in a tree structure Description Allows for the building of XML data structures using a tree representation, without the need for an extension like DOMXML. "Desperately wants to be Perl, but desperately doesn‘t want to be Perl." PHP != Perl. End of story. Some people might want it to be more like perl with all it‘s obscure syntax and shit, but it won‘t become like that. "PEAR just ain‘t CPAN." PEAR doesn‘t try to be CPAN either. "No ‘use strict;‘ (e.g., checking variable names)" error_reporting(E_ALL); Or to check for deprecated things: error_reporting(E_STRICT); Anonymous comment at 2004-02-25 22:11:06: I‘d love to rant about the poor design (as an example) of this website, but it‘d be more creative of me If I‘d help out with my ‘expertise‘ in design.... rant all you want, but will it change anything? (besides for how long have perl and C existed?.... give it time my friend) my two cents (yes we have cents in europe as well .)) Posted by N3dst4 at 2004-02-26 09:24:53: I‘m so glad I wrote this page. It‘s generated more comments and mail than anything else here. PHP has certainly made huge strides since mid 2002 when I first did this list. I expect I‘ll gve a go from "fresh" when PHP 5 is released (soon now!) and re-evaluate it then. Anonymous comment at 2004-03-02 06:34:00: Anonymous comment at 2004-03-02 06:34:24: . . Posted by Garry Heaton at 2004-04-06 20:55:50: What about insane defaults like mysql_fetch_array() producing twice as many entries as columns in the dataset when called without the optional second argument? Posted by Garry Heaton at 2004-04-06 20:56:20: What about insane defaults like mysql_fetch_array() producing twice as many entries as columns in the dataset when called without the optional second argument? Posted by Garry Heaton at 2004-04-06 21:05:47: What about insane defaults like mysql_fetch_array() producing twice as many entries as columns in the dataset when called without the optional second argument? Posted by dan at 2004-04-16 17:55:07: I find it interesting to note that all the flamage in defence of PHP (and almost all of the /text/ in defence of PHP; there don‘t seem to be a lot of non-flammatory comments from people who like using it) appears to be written in some kind of adolescent hacker l33tspeek that really only resembles English to the extent that playing the Lottery resembles a sensible investment strategy. You can make your own inferences from that; I‘ve made mine. Posted by php.haha at 2004-06-14 20:31:14: php is a cute little toy for introductory programmers to test out. for small systems it does the job with minimal use of energy. think economy Posted by sm0 at 2004-07-14 23:16:53: php 5 is out. oh yeah.. and.. MOO! Posted by N3d at 2004-07-15 09:28:06: Thanks sm0, I‘ve added a doohickey at the top of the page. Anonymous comment at 2004-07-16 13:09:46: In #15 you state that you can‘t interpolate array indices in strings, do you mean this? $a = array("foo", "bar", "baz"); print "{$a[0]}bar" // prints foobar Posted by N3d at 2004-07-16 14:05:05: Ahaha... yes. Is that in PHP4? Posted by TOGoS at 2004-07-18 22:39:31: > Arrays are hashes. This is one of the few things I *like* about PHP. For me, arrays and hashes are simply different ways to implement a map. What I *don‘t* like is when I can‘t treat them the same way, as in Ruby, where hash.delete( "foo" ) deletes an item based on it‘s key, but array.delete( "foo" ) deletes it based on value (I still like Ruby, tho :). Maybe the programmer should have the option to implement the map as an array or hash, depending on whether they want to be able to use non-integers as keys, but once it‘s created, I don‘t think the programmer should have to worry about the implementation. So I really don‘t mind PHP‘s mixing them. Posted by JasonLotito at 2004-07-19 04:08:42: "Ahaha... yes. Is that in PHP4?" Yes, it is. Posted by JasonLotito at 2004-07-19 04:20:24: "No real references or pointers, just reference-by-name and sort-of aliases. Sometimes, I want a pointer." Might I inquire as to why you think you need pointers to do something in PHP? I have never found the need to use pointers in PHP, so it would be interesting to see your reasons. "Desperately wants to be Perl, but desperately doesn‘t want to be Perl." That‘s doesn‘t really say much. "No standard DB interface (well, except ODBC, but blech)" Their is one in PHP 5, though off-hand, I forget what the extension is called. However, their are several third party interfaces that are very fast. Yes, they are written in PHP, but a move to C wouldn‘t bring them much of a speed increase (and yes, benchmarks were done to see if this was the case). "PHP works best when you forget everything you‘ve ever learn about good programming practices. Unfortunately, that still doesn‘t mean that good practice is expendable. Your code will still bite." Quite the opposite actually, you can apply pretty much all the good programming practices in PHP. Of course, their is a difference between a good programming practice, and a good programming practice in a specific language. What‘s good in C/C++/Java/Perl/etc. doesn‘t follow suit in PHP. Each language works internally in different ways. "include() uses filenames. That‘s yet another namespacing thing." So does C, and I don‘t see how using file names can cause namespace problems. I‘ve written some pretty big things in PHP, and never had this problem. Of course, if you are ignoring good programming practices while writing PHP (as you mention above) then yes, you can have problems. Of course, I can do this in any language. =) "PEAR just ain‘t CPAN." And it‘s not meant to be. CPAN, while it is great, isn‘t 100% goodness. "You can‘t interpolate array indices in strings. Poop." As mentioned previously, yes, you can. "No ‘use strict;‘ (e.g., checking variable names)" Again, as mentioned previously, yes you can. While I don‘t think PHP is perfect, a lot of the problems mentioned here, and on other sites, is merely someone who really doesn‘t know the language. "I‘ve written a fair whack of PHP now and having a background of Java, C and (most importantly) Perl, I feel justified having a bit of a rant." A "fair whack" at PHP doesn‘t tell me much in the way of experience, and frankly, sounds to me like someone who quickly learned the basics of the language, and started programming in it as if he was using Perl/Java/C/other language they already knew. Each language does things in it‘s own way. If you are programming PHP, and your first program is lack of pointers, that pretty much tells me everything I need to know: You want PHP to be Perl/Java/C, or something else you already know. Posted by N3d at 2004-07-19 09:12:23: Hmm. Thanks, Jason. As for my experience with PHP: - A multi-user DNS administration system - A PDFLib-based document filler-and-creater - A ticket/task system and a project management system with timesheeting and billling. - An image gallery - A bunch of smaller things. So I do feel qualified to have an opinion. Posted by N3d at 2004-07-19 09:15:03: TOGoS: Fair play to you. Maybe Jason is right and I‘m too set in my ways, but I‘ve always found the mixed approach dangerous. I‘ve only knowingly screwed something up as a result of it once, but still... Posted by Eric at 2004-07-28 22:09:04: Pear DB is the standard db interface. chained method calls are in php 5. Not all arrays are hashes, just associative ones. error_reporting(E_ALL) is about the same as ‘use strict‘ Posted by Eric at 2004-07-28 22:10:11: Another thing, php‘s variable system is all copy on write which so if you copy a variable it doesn‘t copy the variable until you write to one of the copys. Cheers. Anonymous comment at 2004-08-06 00:57:11: I was going to post a comment about the numerous inaccuracies in the annoyances section, but seeing as how this appears to be a !php fanboy site, I think I‘ll skip it. I don‘t believe that is worth reading any further, either, since there doesn‘t seem to be much of an effort to truly investigate what‘s real and what isn‘t. Have a nice day! Oh, BTW, I‘ll be over here earning real money developing PHP applications while you figure out how to optimize that last little bit of your 323-character regex for discovering an RFC 822-compliant email address in your Perl script. Posted by Sergey at 2004-08-06 13:36:29: I‘ve really getting sick of all the comments about perl syntax and its regexes. Give me a break, people. Perl has other disadvantages, but not the syntax. The synax is very much like PHP‘s and #4 annoyance exactly points to it (which actually means that PHP syntax is like the Perl‘s). If you think that PHP‘s syntax is better please at least one show a comparision of the PHP and Perl code which does the same. And about regexes. In PHP you use the same regexes as in Perl, which are even called Perl-compatible, so what‘s wrong with them? Perl gives you much more ways to work with this regexes inside your code with makes possible a more tight integration with them. This is not a disadvantage by any means. Posted by Bilal Kathrada at 2004-08-06 18:18:09: 1. True, but that‘s the price you pay for a "safe" language 2. PHP 5 has added namespaces 5. If you want a ‘standard‘ interface, try PEAR::DB 7. PHP 5 has added this 10. You can use PHP arrays just like Perl arrays OR like Perl hashes - it‘s up to you! 14. PHP has been around since the stone age, and its syntax doesnt look like it (*cough* Perl) =P 16. Try ‘error_reporting(E_ALL)‘ and PHP will dump a Notice in the middle of your page Posted by Bosko at 2004-08-29 02:54:36: This article would be ok if you didn‘t openly title yourself as an elitist and claim all PHP users are "Dumb people who can‘t think for themselves" :) Posted by sjv at 2004-09-21 06:48:05: I love PHP. Does everything I could ever imagine and more. I guess I must be a "non-programmer weinie" Posted by ss at 2004-10-05 16:23:26: ss Posted by Perl Dude at 2004-10-23 00:40:36: An analogy: PHP : perl :: Javascript : java. That is, PHP is supposed to be "easier" but look about the same, and ends up being a steaming pile of sh*t that‘s full of bugs and incompatibilities. Anonymous comment at 2004-10-23 00:43:43: It‘s worth noting that one could fairly easily write a reasonably fast PHP interpreter in perl, but I doubt very much if you could write a reasonably fast perl interpreter in PHP! Anonymous comment at 2004-10-29 19:56:39: I would guess that its impossible to write a perl interpreter in php. Last I heard, they couldnt even write a perl syntax parser in perl. Yes, someone was actually trying to do it. Posted by Piotr K. at 2004-11-10 12:56:33: PHP 5‘s garbage collector is broken. It uses reference counting. Everyone that ever read anything about memory allocation knows that refcounting sucks because: 1. It is very slow. 2. It leaks cycles. 3. It has poor responsiveness. In PHP it sucks even more because there are bugs in it. And PHP developers don‘t find it is a bug. Besides references in PHP 5 are useless. They can make run your scrips 100 times slower. It is faster to pass large objects by value than by reference! Weird. What is most annoying is Zend telling everyone that PHP is "mission critical" and "for enterprise solutions". Bullshit. By the way PHP is quite a pretty language for homepages. Posted by Cobes at 2004-12-03 15:36:00: How about those constant stupid parse errors, etc. Such as: Warning: Cannot modify header information - headers already sent by (output started at /home/blah/blah... when all I was trying to do was set ONE stupid cookie and then read it on the next page. It "did" set the cookie at first but when you try to overwrite it with a new value, it craps with the above message (EVEN after you delete it and re-try!) PHP basically sucks, for me anyway... Back to Perl and Javascript. I was hoping to be able to use the ‘state‘ features when navigating to the next page. (Setting a cookie and then having it be there when I went to the next page.) Oh well, maybe in version 6?? Probably not... Posted by Andrew at 2004-12-16 06:41:19: Cobes, that‘s not a parse error, it‘s a logic error, and it means exactly what it says. The problem is that you‘re trying to do something that‘s not possible -- namely, send headers _after_ content. You should try reading error messages, amazingly enough some of them actually tell you what you did wrong! Posted by Ysre at 2004-12-22 03:28:47: on a sidenote: Doing something like this in PHP will yield some unexpected results (although I couldn‘t figure out when it does things the one or the other .. yet): $foo = true; echo "foo is: a) " .( ($foo) ? "true":"false"). " or b) " .( ($foo==true) ? "true":"false"). "<br>\n"; Now try this with $foo set to 1 (numerical).. One time PHP uses the setting of $foo and says it is true even if the value of $foo is usually interpreted as false. The other time it uses the actual value of $foo (just as you would expect). Posted by sbr at 2004-12-28 21:13:21: Wow, you said everything I have been trying to say about php for years. I‘m sending this page to more than a few friends :) Posted by nirus at 2004-12-28 22:28:16: VB sucks but people use it. Nothing compares to C but php is a good gateway langage though its syntax can be strange at times. It is too easy to learn from example because of all the open source scripts. Also it only takes notepad to create scripts. C and java and even crapy VB need compilers. Correcting my self.. the server is the compiler for php, but it is not normaly another program that you have to learn on top of the language... This is good for a new programmer. Posted by Jack at 2005-01-03 02:39:19: I‘m sorry, but you guys are a big minority. I am what some of you may call a n00b programmer, but I actually have years of expirience under my belt with VB, C/C++ (BOTH), Java, SQL, and PHP. I‘m also proficient in HTML, but I don‘t count that. Anyways, the majority of you misunderstand the purpose of PHP. This is a language that tries to be compatible with everything. We live in the real world, and we know that this is impossible, and the language does suffer as a result. BUT, you cannot just ignore PHP‘s strongpoints as they have drawn a community that is now in the millions. You guys seem to have picked some obscure concept where PHP fails (i.e namespacing). So what? PHP has over 3,000 functions, and the language is constructed very well. Use what works, noone is asking you to use what doesn‘t work. This PHP bashing saddens me because this is my language of choice, and I don‘t think that I am alone. Sure, there‘s times when it‘s frustrating, but that comes with any programming language. I think you need to step back and re-evaluate the purpose of PHP. Focus on the positive, not the negative, as PHP has a lot of strengths, and all its weaknesses were pretty much summed up in those 16 points (many of which have been fixed by PHP 5) Anonymous comment at 2005-01-30 01:53:38: http://www.bazon.net/mishoo/home.epl?NEWS_ID=154 -- just another fsckin‘ annoyance ;-( Anonymous comment at 2005-01-30 01:57:11: ... and to Jack: if you like PHP, that‘s because you probably haven‘t done any serious C++ programming (oh you said you did, but you didn‘t mention “serious”). Before saying that a language is nice because it has 3000+ functions, please think about Lisp which is based on only 7 primitives yet it lead to any part of technology that you use today. Think about Maths. Rely only on what has been proven so far. You can easily prove 7 primitives, or accept them as axioms, but you can‘t accept 3000 functions. Really, PHP sucks and <rude>the reason it succeeded in mainstream are guys like you.</rude> Posted by $N3d == ‘Whiner‘; at 2005-02-02 17:14:48: I started as a web designer (graphics + html), and gradually starting developing sites using asp/access. I moved on to php/mysql which was a huge leap forward in usefullness, speed, and support. I‘ve been developing commerical sites since for about 3 years now. I am who php was meant for. And there‘s a lot more people like me out here in the real world of web development, than there are of Perl or Java developers. We are out here creating php driven sites that get the job done. Many of you say php isn‘t meant for "mission critical" jobs. Please define what you mean by that. Because, the sites I‘ve created have been mission critical for the businesses that own them. They‘re not NASA, they‘re not Amazon.com, but they make their money from their PHP driven sites. That is mission critical in my view. I haven‘t had any problems creating dynamic sites in php that can handle hundreds of simultaneous users and transactions without any lag. PHP/mysql is great for small/medium sized sites that are indeed mission critical. It‘s also capable of handling the big dogs‘ sites as well. And if the traffic grows, you can always switch to firebird or some other database that can handle it better. But, php is perfectly capable of handling most web projects out there. Most php users will never encounter any of the annoyances listed. And you can‘t say that that‘s because they‘re non-programmer weinies. Do you use EVERY function available for your language of choice? I doubt it. There is no perfect language, you‘ll probably find annoyances with everything - deal with it. All have positives and negatives. You make your design work using the positives you have. And PHP has a hell of a lot of positives. I‘ve never encountered one problem that I couldn‘t resolve in a matter of minutes. What PHP lacks in "real" programming, it strongly makes up for. It‘s easy, yet powerful and fast. It can do more than what most people will ever need it to do for their applications. And you can‘t even deny the fact that php is the most widely used web development language, and as a result, has great support and documentation. PHP is hands down the best web development language available today. Anonymous comment at 2005-02-02 17:16:00: sorry, name should be $N3d = ‘Whiner‘; - my bad Posted by CP at 2005-02-03 15:31:18: My hosting server does not support PHP - Below is a list of what it does include. Am I at a distinct disadvantage here do you think? Windows 2000 Premium Hosting Option · 100Mb space · CGI / Perl / ASP scripts enabled · Site is backed up on a weekly basis. · Supports XML, JSP, Direct X, Active X and Flash · 3Gb data transfer a month · FTP access to the site · ODBC Enabled · Front Page extensions supported as part of the package · SQL/Access Database space enabled. · Surf Stats to provide detailed information on site usage Posted by Mike at 2005-02-04 13:51:36: After using and advocating PHP for the last 3 years, I have today discovered that it does in fact, suck. I shall hence forth endeavour to use a better language, and try to regain all the good programming practices that PHP has destroyed. Posted by Mike at 2005-02-04 13:54:29: And just by the way, earning lots of money off PHP is not a sign that it‘s a well-designed language. People earn lots of money off VB ... Posted by FUCK@FUCK-ROOM-.FUCKONE at 2005-02-12 15:33:50: FUCK YOU ALL DAMNED ASSHOLE I HATE YOU ... STOP INSULTING PHP.. PHP IS BETTER THAN PERL THE DAMNED SCRIPTING LANGUAGE..... FUCK YOU ALL PERL GUYS.. FUCK FUCK FUCK FUCK YOU ALLLL... BULL SHITS...... I WAS HAPPY WITH MY PHP AND YOUR SITE CHANGE EVERY TYHING.. I AM NO LONGER HAPPY.... FUCK FUCK YOUU... I CAME HERE TO MAKE YOU USE PHP, BUT YOU MADE ME USE PERL!! SUCCKERS ASSHOLES SUN OF BITCHES. Posted by N3d at 2005-02-12 17:09:19: Result! Posted by Taco at 2005-02-17 09:54:20: Seems to me that most programmers here who label php for the simple-minded, non-critical developers are the ones up in their ivory tower, looking down on the yeomen down there. Need I point out that for the last 20 years (!) on a global scale, 80% (!) of all IT projects fail? They get too complicated, don‘t deliver, are way out of schedule or budget, or just simply do not work. That‘s your work there, I hope you are really proud of your "good programming"! Most of those projects just basically do not do what the customer asked for. They are nicely written, and they can do tons of other stuff. But just not what they were intended to do, at the time they were intended to be finished, at the price that was agreed upon. I have seen many php projects that just simply do what they need to do, and they do it in time, within a tight budget, and fast. Also in mission-critical environments. Guess what this world needs … I doubt it is just more good code. It is good applications, which basically means you need to interact with the end-user. Who really does not care about the language you use, unless you make a fuss about it. Don‘t. Put your energy in the interaction, it will pay off! Posted by Carl at 2005-02-25 15:30:45: I tried PHP because I‘ve seen other well-designed, high-performance sites use it. After encountering some glaring faults with objects and error handling, I‘m ready to set it right back down again. PHP ignores return codes in constructors. PHP can‘t serialize composite or derived objects correctly, which is vital if you want to pass it via a session (which is the only damned way to pass data from page to page). You cannot get a straight discussion of theory in the community; you will simply get some ass-hat giving you yet another poorly written function to work around the wart. Systematic error handling? Don‘t make me laugh. This language is a joke, suitable only for children afraid of anything more complex than if/then statements. Posted by Carl at 2005-02-26 04:05:37: I just had to address these comments because they‘re so ignorant: "Need I point out that for the last 20 years (!) on a global scale, 80% (!) of all IT projects fail?" This is ridiculous, it‘s like saying that since most houses will eventually be demolished, and many houses are built of mud and straw, we might as well build houses out of mud and straw. "They get too complicated, don‘t deliver, are way out of schedule or budget, or just simply do not work. That‘s your work there, I hope you are really proud of your "good programming!" Actually, over the past 20 years, "good programming" practices are fairly recent, comprising hard lessons learned from bad choices and experience. PHP seems obsessed with repeating practices and concepts that have failed time and time again. "Most of those projects just basically do not do what the customer asked for. They are nicely written, and they can do tons of other stuff. But just not what they were intended to do, at the time they were intended to be finished, at the price that was agreed upon." No, actually these projects are victims of their own success. They started life as "just-in-time" projects, hit their niches in a huge way. The reward for success is growth. Then they discovered that the initial hasty decisions prevented speedy changes, maintenance, or additions of features. Thus, they could not grow. This is why projects die. "I have seen many php projects that just simply do what they need to do, and they do it in time, within a tight budget, and fast." And another generation of newbie programmers fails to learn from the previous generation, becoming doomed to repeat their mistakes. Don‘t get me wrong. PHP is fine for the scope it was intended to address (rapid prototyping of web pages). But it is definitely not mature enough to solve larger problems in a long-running project. Posted by Harry Fuecks at 2005-02-28 16:20:03: Got some time to kill so why not... a) all mature web dev platforms out there today suck (in different ways / for different reasons). All things being equal, PHP sucks the least. Consider this project http://www.wheatfarm.org/ for some new ideas - see the presentation. b) PHP aims to be as declarative as possible (functions are preferred to operators, symbols, magic variables) and results in source code that should be readable by anyone with experience in C or derived languages (C++, Java etc). c) What most of the discussion here misses is that PHP is being applied to a specific problem (the web) and within that field there is a narrower range of use cases it has to fulfill than a general purpose language (e.g. Perl). For example you rarely need to sort a list with PHP, the sorting already having been performed by a database engine - just spit out the results as you get them. So PHP arrays don‘t need to be optimized for this. Meanwhile consider an sgmlish document (replaced angular brakets with curly for sake of this blog) like; {root} {foo}2{/foo} {foo} {bar}X{/bar} {bar}Y{/bar} {a}3{/a} {bar}Z{/bar} {b}2{/b} {c}1{/c} {/foo} {foo}1{/foo} {/root} With PHP that could be serialized into an array; $root[‘foo‘] = 2; $root[‘foo‘][‘bar‘][0]=‘X‘; $root[‘foo‘][‘bar‘][1]=‘Y‘; $root[‘foo‘][‘a‘] = 3; $root[‘foo‘][‘bar‘][2]=‘Z‘; $root[‘foo‘][‘b‘] = 2; $root[‘foo‘][‘c‘] = 1; $root[‘foo‘] = 1; Then unserialized back into it‘s original form without loss of order like; Given PHP is a web specific solution, it makes sense that PHP‘s collections are as flexible as possible for this type of use. Another point on use cases is PHP doesn‘t need good garbage collection - reference counting is good enough - nothing is preserved in memory between HTTP requests. See http://talks.php.net/show/lt2004-lamp/3 d) While you‘re busy hating PHP, you‘re missing opportunities. Consider the options of generating PHP (given it‘s really easy to deploy on a website). For all it‘s warts PHP has become a platform you can target to create "software for the masses". MoveableType worked this one out BTW. e) Rather than focusing on what PHP does wrong, think about what it does right. On that note, comparing PEAR to CPAN, the fundamental desision in PEAR was it should be moderated - the "noise" you find in CPAN should be prevented in PEAR. That‘s lead to a different set of headaches but just recently evolved into PEAR (or the PEAR client in fact) taking a step in the direction of P2P networking with the notion of "channels". See http://blog.php-tools.net/archives/115-I-love-Greg-Beaver!.html - most important is dependencies between packages can be resolved across channels (servers). This is an experiment Perl coders should watch closely. f) Read this: http://www.jwz.org/doc/worse-is-better.html |
||
|
|||