Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 42 |
Nodes: | 6 (0 / 6) |
Uptime: | 10:43:13 |
Calls: | 222 |
Calls today: | 2 |
Files: | 824 |
Messages: | 121,915 |
Re: is PHP a neccessary evil?
By: LaRRy LaGoMoRpH to All on Sun Oct 12 2014 20:37:35
LL> I don't like php - but it seems to be all over the place. It seems like
LL> if you want to do web development work, they want you to know php.
LL> But in a perfect world, is PHP neccessary or even ideal to do the things
LL> it's used for moving forward? Maybe it is, I don't know.
LL> It seems very database oriented - like you better know SQL if you know
LL> PHP or else you're kinda missing something.
LL> Then there's all the darn ?'s and $'s all over the place that don't make
LL> things any easier to read. Sure those things are nifty when it's jquery
LL> tacking on javascript, but as a core element of the language seem to
LL> make it more difficult to read.
LL> There's tons of crap that runs on PHP, but is any of it really cool in
LL> any way? I want to see something cool that came from php so I can be
LL> like, oh wow, you can do that with PHP - i want to do that.
I guess I have a diffrent feeling about PHP. To me, PHP feels like any other server-side language. I don't think it's really any better or worse than ASP.NET, JSP, server-side JavaScript, etc.. I actually somewhat like PHP in that it's fairly flexible in what you can do with it. The syntax with the $ symbols etc. doesn't really bother. I don't know of PHP using the ? symbol for
anything though - the only place I can remember it using ? is in the start & end tags (<?php and ?>), which I suppose isn't actually part of the language, but rather server as tags for the parser to know whether or not to process the
text as PHP. In fact, I think the $ symbols can make it easier to read once you get used to it, since you know that a name starting with a $ is a variable.
In other languages, such as C++, C#, etc., variables don't start with any special symbol, so it can sometimes be ambiguous at first to know what you're dealing with, although it's usually easy to determine from its context.
Also, you only need to know SQL if the PHP page(s) you're working has to deal with a database to save & load data. That is a fairly common task though, since many web sites use databases to store information, and SQL is the most common language for a database.
I think there are a couple reasons why PHP is as popular as it is. PHP is a flexible language that allows you to write functional code as well as object-oriented code; it doesn't force a paradigm on you. You can just get right into it and start coding. Also, PHP is a free language that doesn't require any license fees - The PHP engine is freely available for Apache and other web servers.
What I do find somewhat annoying about PHP is that there are multiple ways of doing some things. There are several functions in the PHP standard library that do very similar things, but with slightly different parameters. I think it would have been better if the library was more consistent and concise.
Nightfox
---
¨ Synchronet ¨ Digital Distortion BBS: digitaldistortionbbs.com