...

View Full Version : Opinions About PHP



netroact
01-02-2008, 09:56 PM
Hello,
I would like to ask a sincere question:

Do you believe PHP has turned out to be the language they said it would be when it first came out?

I know it's popular, but that doesn't mean it's necessarily better. Anyone who owns a server becomes very familiar with php.ini, because there are so many security issues. I know someone's gonna blame poor programming, but shouldn't some of this stuff be built into the language?

I have used PHP in some scripts, but I always go back to Perl mainly because it's more fun in my opionion.

I am just curious about people's opinions of PHP.

Fumigator
01-02-2008, 10:36 PM
I'm no authority, but I've really enjoyed it. It suits my lousy programming style :p I could not get into Perl in the two days I tried. The planets were not aligned for me I guess. And anymore I'm steering clear of Micosoft-centric stuff; the Vista debacle has cut deeply into my faith in the company's competence. So ASP is not an option. Cold Fusion... Didn't The University of Utah try to make that work once? :D

The security issues of PHP are annoying to be sure PHP 5 has addressed much of the problem and shows real maturity... Lastly I'd say most of its popularity stems from its price tag, which can't be beat.

GO ILLINI
01-03-2008, 01:40 AM
i do love php. Its just so much fun to see stuff work. Another reason is that it is multi platform. My boss is a windows freak, and I love linux(CentOS baby!) And I didnt need to learn a whole new language(asp...) just to work there. I just installed php and it works the same.

-works everywhere
-free
-fairly easy to learn/remember
-secure if you make it secure

-Adam

rfresh
01-03-2008, 02:11 AM
I stopped using perl about 5 years ago when I first learned PHP - I've been using PHP ever since - I find it superior to perl and as many have said before, it marrys perfectly with MySQL.

Inigoesdr
01-03-2008, 03:04 AM
I'm just going to echo the other points, but also add that security needs to be in the hands of the programmer to begin with. When the language steps in and tries to enforce security where it shouldn't be to begin with(magic quotes for instance) it just causes more problems than solutions. PHP was originally a simple form processor, so I'd have to say that it's not what was originally intended; it's so much more than that now. I understand you liking PERL though, every PERL programmer that I've ever spoken to always goes back to their language after trying something else. I've been told various reasons for this, but most seem to like the power and simplicity(to them :p) of PERL.

FishMonger
01-03-2008, 03:43 AM
I always get a chuckle when I see questions like this. Whenever you pose this type of question, the answer will always be slanted toward the language of the given forum, no matter which language you're asking about. As everyone knows, my language of choice is Perl, but on rare occasions, I'll do something in PHP (only when it's the employer's requirement). I could list the reasons why I prefer Perl, but there is no reason to do so, and I don't want to start the "mine is better than yours" war.


PHP was originally a simple form processor
It actually started out as a collection of Perl (and I think bash) scripts that handled form processing and a few other things. Personal Home Page

netroact
01-03-2008, 04:35 AM
Thanks for replies thus far. Obviously PHP people like PHP, and Perl people like Perl. I was just kind of curious if opinions had changed over the years in the PHP community. It sounds like the PHP community believes it is getting better.

Inigoesdr
01-03-2008, 04:52 AM
As everyone knows, my language of choice is Perl
I didn't know that. :D

It sounds like the PHP community believes it is getting better.
Do you believe it's not, or did you just want to know what other people think?

netroact
01-03-2008, 05:03 AM
Do you believe it's not, or did you just want to know what other people think?

Well, I haven't noticed that it's better, but I don't use it all the time. I keep hearing about exploits and injections, and if you maintain a server with shared hosting, it can be a nightmare. I liked it a lot when it came out until I did a quiz script that used a lot of quotations a few years ago.

PHP sure is popular now, and I guess there is a reason for it. That's what I am trying to figure out.

Fou-Lu
01-03-2008, 05:25 AM
OMG I can't believe someone used its original name: Personal Home Page! Ah, the good old Shebang lined PHP. I miss those times :(

I stopped using perl about 5 years ago when I first learned PHP - I've been using PHP ever since - I find it superior to perl and as many have said before, it marrys perfectly with MySQL.

Similar story, about the same time too (right around when php3 was released).
I will not say that it is superior in the least, but I do find it superior for static web based applications compared to Perl. Perl for Unix administration and socket programming is unbeatable and cannot be implemented by PHP. +1 for Perl.

The part I've enjoyed most is wandering with php as it matures. I remember the whole 'omg array_merge works with mixed data yay' followed a couple of releases later with 'omg array_merge only works with arrays like it supposed to have and no my stuff doesn't work :(', lol. PHP5.0.1 had a sloppy object core, but as of (the lowest version I've been satisfied with testing in) 5.1.2 I've been very pleased with their OO engine.

I do not believe that a language should be responsible for the programmer. Sure, some languages have features (java has its garbage collection and sandboxing, C# has its delegates, etc), but how much I would love to program a C program to have a message come up like 'oops, you can't access this section in memory'. W.T.F. Everything programmed has holes in it, a primary compilation of these applications was released with the name Windows :D
Frankly though, php does hold a lot of capabilities for 'fixing the programmers mistakes' released with the latest versions of php - someone else mentioned this already. MySQLi uses a prepared statement mechanism that helps to diminish SQL injections.
But if a programmer does like so:


$db->query('SELECT * FROM table WHERE id=\'' . $_POST['id'] . '\'');

They deserve to have their database hijacked. Proper control of a language is the key to proper usage, and yes everyone makes mistakes. The point is nothing is perfect but if you do everything right it should minimize the exploits available.
Lol this reminds me, with the PHP 5.0.1 I put together a quick object. In my object I had a private method. In a child class I had another private method of the same name. Interestingly enough, PHP would use the private method of the parent instead of the child when accessing from the child - obviously an incorrect usage. That caused me so much grief :(

Anyway, thats my 2 cents



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum