- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
There are very clear directions on how they recommend that you do it, but as with e.g. Perl it's a very open language that has evolved and as with anything with free ranges of creativity allowed the results you see in different places are filling all the imaginable space.
Every bleeding programming language have flaws and forces and those who actually works with them knows them, so why even waste time raging about language X because you like language Y when someone else could easily turn the boat around?
Just my two bytes ...
PS: I couldn't name a language where the exact same code couldn't be implemented in the exact same crappy way by a bad programmer - ie. not a language problem.
Admin
I agree PHP is bad, although if careful, you can write decent code in it.
What I wonder is, why is it so extremely popular if other options like Python or Ruby are more sane? What did PHP do right to make it so popular despite its flaws?
Admin
I bet that code started life as:
<?php $thisyear=date("Y"); $lastyear=date("Y")-1; ?>and then a year later it had to be "enhanced", then "enhanced" again, etc.
Admin
Watch out! Next thing you know, the guy will remove all line breaks and get everything in a single line
Admin
I swear this is the last, last, last, last, last year I'm going to add one of these lines in the code.
Admin
It's really simple actually. PHP in the form of the mod_php apache module is pretty installed by default along with apache. All the config is already done and getting up and running is as simple as putting php files in your document root and testing them.
This makes for a really low entry barrier for PHP development. Add to this the fact that it's easy to produce output with PHP and you have what could be described as the ideal Get Stuff Done Fast solution.
While both Python and Ruby can be used for the same purpose, neither is as simple to get off the ground. Both require additional setup in some form or other and those additional setups tend not to be installed as server default software.
As for PHP as a language: Yes, it's ugly and all mixed up, but it isn't actually crap. On the contrary, it's very easy to get a lot done quickly with a fairly small amount of PHP code thanks to the fairly bare-metal, get-your-hands-dirty-fast approach to producing output.
What is true is that most PHP programmers are crap and the PHP coding community takes cargo cult coding to a whole new level, never mind the huge pool of poorly written stock solution software out there (Joomla, Drupal, CakePHP, Symfony, etc, etc)
Personally, my take having switched from Java web dev to PHP web dev. Don't knock the language. Sure, it's ugly, jumbled and a result of much evolution and kludging but it's also a quicker, easier way to produce results than either Java, Ruby or Python in the very specific realm of web development. Take it out of the web dev niche and it's your funeral.
Rather, knock the legion of piss-poor moron PHP coders out there producing Joomla add-ons, Virtuemart and just about every other PHP project out there.
If you need proof that PHP can be decent, take a look at the Doctrine ORM project.
Admin
well, it is PHP, I'm sure it works well on his personal home page.
Admin
In the vb++ you type the:
Loop While (7) Then Last++ End Loop For Me
Admin
Personal Home Page. That is all.
Admin
It imitated ASP, where you could just throw code inline in a web page. So it got picked up by a lot of "html programmers". Yes it is possible to do good coding in php, but you really have to wonder, "why bother?"...
Admin
I wonder at the insecurity of people who feel the need to attack PHP. It's just a tool. If you find it useful use it. If not don't.
I suspect it's simply because people who use PHP get things done quicker than those who don't know how.
Admin
What is wrong with ASP? ColdFusion had the same approach. So did Vignette. They all served their purpose just fine. And they have all been used on very complex web applications.
Admin
Admin
Thanks for the tip.
Admin
Actually, for such a case (dropdown for 120 years in php) I employ loop unwinding (by hand). Saves numerous proc cycles!
Admin
Umnmm - howabout "because it's easy to use"? Granted it's both a strength and a weakness (which should be for obvious reasons).
Admin
Oh come on!
This is normal on embedded systems that don't have filesystems. I must say it's brilliant. But he has forgot the year FILE_NOT_FOUND. Woooooossshhhhhhhhh
Admin
I was born
lastlastlastlastlastlastlastlastlastlast lastlastlastlastlastlastlastlastlastlast lastlastlastlastlastlastlastlastlastlast lastlastlastlastlastlastlastlastyear.
Admin
This is not true.
Admin
As if nobody ever wrote crap in Java, C++ etc.
Despite 10 years in the industry, I've never met a Java developer who knew how to write a unit test, for example. TDD has been the accepted process in the last two PHP teams I've worked in. Don't even get me started on the hopeless .Net systems we have to integrate with.
Admin
Admin
Pretty sure it was a Sunday, but dont quote me on that.
Admin
Oops
Admin
Admin
The reason people talk down about PHP and its cousins is that the problems that get solved in those languages are unglamorous from a CS standpoint. I say this as someone who primarily does PHP work, but can recognize which problems are considered the "fun" ones. Generally, it's the ones that require advanced math; reinventing the same old CRUD wheel, despite being useful and honest work, is not the sort of thing pimply-faced youths daydream about.
Admin
That code is too prone to mistakes, it should be like this instead.
<?php $thisyear=date("Y"); $lastyear=$thisyear-1; $lastlastyear=$lastyear-1; $lastlastlastyear=$lastlastyear-1; $lastlastlastlastyear=$lastlastlastyear-1; $lastlastlastlastlastyear=$lastlastlastlastyear-1; $lastlastlastlastlastlastyear=$lastlastlastlastlastyear-1; $lastlastlastlastlastlastlastyear=$lastlastlastlastlastlastyear-1; ?>Admin
Yes, I agree, PHP is for the getting done of it quicker, very good point, that should keep the real computer engineers quiet now
Admin
So is it false, or should I consider the default case ?
Admin
Supra shoes are so popular all over the world. Whatever you take on Supra being in the Supra Skytop Shoes market. Now Supra Strapped Shoes also very popular attention. It is nice that they actually took the time to make Supra Skate Shoes that work well. Supra shoes is a brand that has been inspired, designed and marketed by passionate individuals. We have brought to you the fullest selection of Supra footwear at cheapest price. Overload Skateshop carries a wide range of Supra Shoes to fit your 9-stair kickflips.