• is PHP a neccessary evil?

    From LaRRy LaGoMoRpH@GRUDGEDU to All on Sun Oct 12 20:37:35 2014
    I don't like php - but it seems to be all over the place. It seems like if you want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it's used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know PHP or else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make things any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to make it more difficult to read.

    There's tons of crap that runs on PHP, but is any of it really cool in any way? I want to see something cool that came from php so I can be like, oh wow, you can do that with PHP - i want to do that.

    I see no other PhP messages here, so I don't know if there's anyone else out there who has an opinion on php. I obviously haven't gotten too intimate with it but I did pass the codeacademy course in a couple hours, I don't think I learned much php specific stuff though.

    ll morph G futureland.grudgemirror.com LaRRy LaGoMoRpH\-/
    O
    =M=
    'not your average board check it out' /-\


    ---
    ■ Synchronet ■ Futureland.Grudgemirror.Com ** LIVE ** Music and
  • From Khelair@TINFOIL to LaRRy LaGoMoRpH on Mon Oct 13 08:41:51 2014
    Re: is PHP a neccessary evil?
    By: LaRRy LaGoMoRpH to All on Sun Oct 12 2014 20:37:35

    I don't like php - but it seems to be all over the place. It seems like if want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it' used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know PHP o else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make thi any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to make it more difficult to read.

    PHP seems to have grabbed a huge chunk of the market share, yeah. It seems to be most evident in places where the servers are trying to be kept 'lean 'n mean', though. I mean, if you're looking for a really fully-featured suite, with inherent container-based security, you're going to go into JSP, ASP, or [I think there is] another one that I can't remember offhand. Those environments are absolutely obese; they make your server requirements skyrocket.
    Perl, python, and shell scripts (as well as native code executables) work, but they just don't have any inherent security in them. You've really got to be on your toes to make your own application executed directly from the webserver.
    This doesn't seem to be the case as much with PHP, though I know that it still shares some facets of the same risk. The problem I've had with PHP, though I've used it to write some apps, is pretty much what you're talking about. It's a 'dirty' language. Reminds me more than a bit of Perl, except at least Perl knew what the hell STDOUT was for. When you couple that with the horribly duct-taped together OO syntax (at least last time I checked, which was nearing 10 years ago), and some of the other fugly options, yeah... It gets kind of nasty.
    The ?'s, I believe, are more due to the nature of the inline parsing w/HTML, and what the webserver requires in order to find the script. Not sure, though, maybe you're talking about something else.
    As far as the $'s, are you talking about in variable instances?

    Anyway, yeah, I don't use PHP if I can help it, which has kept my hands clean for damn near a decade now. I'd totally sell out on that if it'd get me back into IT right now, though.

    ---
    ■ Synchronet ■ Tinfoil Tetrahedron BBS telnet or ssh -p 2222 to tinfoil.synchro.net
  • From Nightfox to LaRRy LaGoMoRpH on Sat Nov 1 10:02:45 2014
    Re: is PHP a neccessary evil?
    By: LaRRy LaGoMoRpH to All on Sun Oct 12 2014 20:37:35

    I don't like php - but it seems to be all over the place. It seems like if you want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it's used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know
    PHP or else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make things any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to
    make it more difficult to read.

    There's tons of crap that runs on PHP, but is any of it really cool in
    any way? I want to see something cool that came from php so I can be
    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
  • From Nightfox to Khelair on Sat Nov 1 10:09:54 2014
    Re: is PHP a neccessary evil?
    By: Khelair to LaRRy LaGoMoRpH on Mon Oct 13 2014 08:41:51

    talking about. It's a 'dirty' language. Reminds me more than a bit of Perl, except at least Perl knew what the hell STDOUT was for. When you

    I think STDOUT makes more sense on a command line context, as that's what STDOUT was designed for. I don't think STDOUT makes that much sense in a web context. If you were to try to write to STDOUT with PHP, I wonder if the output would show up on the server's console (if it had a console window open for the server).

    couple that with the horribly duct-taped together OO syntax (at least
    last time I checked, which was nearing 10 years ago), and some of the other fugly options, yeah... It gets kind of nasty.

    I started playing with PHP OO syntax about 5 or 6 years ago (with PHP 5, I think). I didn't think it was too bad. It has the notion of access levels (private & public), constructors, and class methods, which is more than what JavaScript has.

    Nightfox
  • From Khelair@TINFOIL to Nightfox on Sun Nov 2 03:53:20 2014
    Re: is PHP a neccessary evil?
    By: Nightfox to Khelair on Sat Nov 01 2014 10:09:54

    I think STDOUT makes more sense on a command line context, as that's what STDOUT was designed for. I don't think STDOUT makes that much sense in a web context. If you were to try to write to STDOUT with PHP, I wonder if the output would show up on the server's console (if it had a console window open for the server).

    Actually I think that I stated that problem incorrectly. If I'm remembering correctly _now_ (which is debatable, as I just had pointed out an issue that I misremembered a few months back here, and my last time using PHP was several years ago), the problem was that it doesn't differentiate between STDOUT and STDERR at all; everything just goes to STDOUT. Feel free to let me know if I'm totally wrong there. :P
    Anyway, I used PERL & Python a bit, and I believe in those languages you just piped your HTML or otherwise formatted output to STDOUT in order to have it included from the cgi output. Not having STDERR made things a little bit messy, in my opinion.

    I started playing with PHP OO syntax about 5 or 6 years ago (with PHP 5, I think). I didn't think it was too bad. It has the notion of access levels (private & public), constructors, and class methods, which is more than what JavaScript has.

    I was supposed to look at it at one point much more deeply, and then got totally bowled over by a life implosion level event. Since then I've been able to learn JavaScript OO syntax and ability, and you're right about that. I guess what was most off-putting for me back in the day was that PHP didn't have anything resembling the syntax or declaration that I'd previous had to learn in Java. That difference put me off enough so that I didn't look much farther, and probably made some bogus assumptions. Now that I've learned JavaScript OO to an extent, it probably wouldn't be that tough to pick up. I should look at it again.
    Still, there's something about PHP that just rubs me the wrong way... Maybe I've just listened to too many of the snobby devs around here talking shit about it without making up my own opinions, though.

    ---
    ■ Synchronet ■ Tinfoil Tetrahedron BBS telnet or ssh -p 2222 to tinfoil.synchro.net
  • From Jason@HDCAFE to Nightfox on Mon Mar 2 01:14:35 2015
    On 11/1/14 1:02 PM, Nightfox wrote:
    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


    I know i'm coming at this message late in the game, but let me just say
    this. I can pretty much do anything in PHP. Obviously within it's
    limits.. That sounds like an oxy moron, but let me put it to you this
    way. With the right modules installed, i can write multi-threaded and
    event driven packages with php.

    Case and point, using pthreads and the Event module for php, i have
    written a multi-threaded web server in PHP. I have been slowly working
    on a php implementation of a xmpp chat server. It's coming along, just
    slowly because of time restraints.

    Jason
    ---
    þ Synchronet þ The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Bob Roberts@HOVAL to Jason on Fri Jan 15 17:56:24 2021
    Re: Re: is PHP a neccessary evil?
    By: Jason to Nightfox on Mon Mar 02 2015 01:14 am

    I know i'm coming at this message late in the game, but let me just say this. I can pretty much do anything in PHP. Obviously within it's limits.. That sounds like an oxy moron, but let me put it to you this way. With the right modules installed, i can write multi-threaded and event driven packages with php.

    Replying to a 5 year old message.

    I read once that Facebook was written in PHP, and over time it was too much work to change it, so they came up with a way to compile PHP so it executed faster. I'm not sure if they are still using it today -- I would suppose not.

    But PHP has always seemed very powerful to me, and can do most anything. However since it's now 2021, I don't think it's much in favor anymore. It seems these days all the kids want to code in Rust or Go, or Python for DevOps.

    Bob Roberts

    ---
    ■ Synchronet ■ Halls of Valhalla =San=Francisco= hovalbbs.com:2333
  • From Nightfox to Bob Roberts on Wed Jan 20 12:42:59 2021
    Re: Re: is PHP a neccessary evil?
    By: Bob Roberts to Jason on Fri Jan 15 2021 05:56 pm

    I read once that Facebook was written in PHP, and over time it was too much work to change it, so they came up with a way to compile PHP so it executed faster. I'm not sure if they are still using it today -- I would suppose not.

    But PHP has always seemed very powerful to me, and can do most anything. However since it's now 2021, I don't think it's much in favor anymore. It seems these days all the kids want to code in Rust or Go, or Python for DevOps.

    I worked with PHP at a job I started in 2003, and worked with it for a couple years there before we moved onto a different project. PHP did seem powerful, and later, PHP got object-oriented support, which made it even better. I did think PHP had some disorganization, such as having multiple functions that did basically the same thing, but I thought it was a pretty good language.

    Very recently, I've discovered the Python Flask framework for server-side web development, and it seems fairly good. It supports a type of messenging that lets you send messages with data back & forth between the server side & client side (i.e., JavaScript in the web browser), which is fairly cool. But I've heard that's not specific to Python though, and it seems other server-side web languages support that now too.

    Nightfox
  • From Bob Roberts@HOVAL to Nightfox on Thu Jan 21 10:14:20 2021
    Re: Re: is PHP a neccessary evil?
    By: Nightfox to Bob Roberts on Wed Jan 20 2021 12:42 pm

    Very recently, I've discovered the Python Flask framework for server-side web development, and it seems fairly good. It supports a type of messenging that lets you send messages with data back & forth between the server side & client side (i.e., JavaScript in the web browser), which is fairly cool. But I've heard that's not specific to Python though, and it seems other server-side web languages support that now too.

    Ahh, this is interesting. Thanks for mentioning it. I'm reading how it can be integrated into RabbitMQ.

    Bob Roberts

    ---
    ■ Synchronet ■ Halls of Valhalla =San=Francisco= hovalbbs.com:2333
  • From LaRRy LaGoMoRpH@BATTLEST/FREEWAY to All on Sun Oct 12 20:37:00 2014
    I don't like php - but it seems to be all over the place. It seems like if you want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it's used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know PHP or else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make things any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to make it more difficult to read.

    There's tons of crap that runs on PHP, but is any of it really cool in any way? I want to see something cool that came from php so I can be like, oh wow, you can do that with PHP - i want to do that.

    I see no other PhP messages here, so I don't know if there's anyone else out there who has an opinion on php. I obviously haven't gotten too intimate with it but I did pass the codeacademy course in a couple hours, I don't think I learned much php specific stuff though.

    ll morph G futureland.grudgemirror.com LaRRy LaGoMoRpH\-/
    O
    =M=
    'not your average board check it out' /-\


    ---
    ■ Synchronet ■ Futureland.Grudgemirror.Com ** LIVE ** Music and
  • From Khelair@BATTLEST/FREEWAY to LaRRy LaGoMoRpH on Mon Oct 13 08:41:00 2014
    Re: is PHP a neccessary evil?
    By: LaRRy LaGoMoRpH to All on Sun Oct 12 2014 20:37:35

    I don't like php - but it seems to be all over the place. It seems like if want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it' used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know PHP o else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make thi any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to make it more difficult to read.

    PHP seems to have grabbed a huge chunk of the market share, yeah. It seems to be most evident in places where the servers are trying to be kept 'lean 'n mean', though. I mean, if you're looking for a really fully-featured suite, with inherent container-based security, you're going to go into JSP, ASP, or [I think there is] another one that I can't remember offhand. Those environments are absolutely obese; they make your server requirements skyrocket.
    Perl, python, and shell scripts (as well as native code executables) work, but they just don't have any inherent security in them. You've really got to be on your toes to make your own application executed directly from the webserver.
    This doesn't seem to be the case as much with PHP, though I know that it still shares some facets of the same risk. The problem I've had with PHP, though I've used it to write some apps, is pretty much what you're talking about. It's a 'dirty' language. Reminds me more than a bit of Perl, except at least Perl knew what the hell STDOUT was for. When you couple that with the horribly duct-taped together OO syntax (at least last time I checked, which was nearing 10 years ago), and some of the other fugly options, yeah... It gets kind of nasty.
    The ?'s, I believe, are more due to the nature of the inline parsing w/HTML, and what the webserver requires in order to find the script. Not sure, though, maybe you're talking about something else.
    As far as the $'s, are you talking about in variable instances?

    Anyway, yeah, I don't use PHP if I can help it, which has kept my hands clean for damn near a decade now. I'd totally sell out on that if it'd get me back into IT right now, though.

    ---
    ■ Synchronet ■ Tinfoil Tetrahedron BBS telnet or ssh -p 2222 to tinfoil.synchro.net
  • From Nightfox@BATTLEST/FREEWAY to LaRRy LaGoMoRpH on Sat Nov 1 10:02:00 2014
    Re: is PHP a neccessary evil?
    By: LaRRy LaGoMoRpH to All on Sun Oct 12 2014 20:37:35

    I don't like php - but it seems to be all over the place. It seems like if you want to do web development work, they want you to know php.

    But in a perfect world, is PHP neccessary or even ideal to do the things it's used for moving forward? Maybe it is, I don't know.

    It seems very database oriented - like you better know SQL if you know
    PHP or else you're kinda missing something.

    Then there's all the darn ?'s and $'s all over the place that don't make things any easier to read. Sure those things are nifty when it's jquery tacking on javascript, but as a core element of the language seem to
    make it more difficult to read.

    There's tons of crap that runs on PHP, but is any of it really cool in
    any way? I want to see something cool that came from php so I can be
    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: digitaldistortionbbs.com
  • From Nightfox@BATTLEST/FREEWAY to Khelair on Sat Nov 1 10:09:00 2014
    Re: is PHP a neccessary evil?
    By: Khelair to LaRRy LaGoMoRpH on Mon Oct 13 2014 08:41:51

    talking about. It's a 'dirty' language. Reminds me more than a bit of Perl, except at least Perl knew what the hell STDOUT was for. When you

    I think STDOUT makes more sense on a command line context, as that's what STDOUT was designed for. I don't think STDOUT makes that much sense in a web context. If you were to try to write to STDOUT with PHP, I wonder if the output would show up on the server's console (if it had a console window open for the server).

    couple that with the horribly duct-taped together OO syntax (at least
    last time I checked, which was nearing 10 years ago), and some of the other fugly options, yeah... It gets kind of nasty.

    I started playing with PHP OO syntax about 5 or 6 years ago (with PHP 5, I think). I didn't think it was too bad. It has the notion of access levels (private & public), constructors, and class methods, which is more than what JavaScript has.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Khelair@BATTLEST/FREEWAY to Nightfox on Sun Nov 2 03:53:00 2014
    Re: is PHP a neccessary evil?
    By: Nightfox to Khelair on Sat Nov 01 2014 10:09:54

    I think STDOUT makes more sense on a command line context, as that's what STDOUT was designed for. I don't think STDOUT makes that much sense in a web context. If you were to try to write to STDOUT with PHP, I wonder if the output would show up on the server's console (if it had a console window open for the server).

    Actually I think that I stated that problem incorrectly. If I'm remembering correctly _now_ (which is debatable, as I just had pointed out an issue that I misremembered a few months back here, and my last time using PHP was several years ago), the problem was that it doesn't differentiate between STDOUT and STDERR at all; everything just goes to STDOUT. Feel free to let me know if I'm totally wrong there. :P
    Anyway, I used PERL & Python a bit, and I believe in those languages you just piped your HTML or otherwise formatted output to STDOUT in order to have it included from the cgi output. Not having STDERR made things a little bit messy, in my opinion.

    I started playing with PHP OO syntax about 5 or 6 years ago (with PHP 5, I think). I didn't think it was too bad. It has the notion of access levels (private & public), constructors, and class methods, which is more than what JavaScript has.

    I was supposed to look at it at one point much more deeply, and then got totally bowled over by a life implosion level event. Since then I've been able to learn JavaScript OO syntax and ability, and you're right about that. I guess what was most off-putting for me back in the day was that PHP didn't have anything resembling the syntax or declaration that I'd previous had to learn in Java. That difference put me off enough so that I didn't look much farther, and probably made some bogus assumptions. Now that I've learned JavaScript OO to an extent, it probably wouldn't be that tough to pick up. I should look at it again.
    Still, there's something about PHP that just rubs me the wrong way... Maybe I've just listened to too many of the snobby devs around here talking shit about it without making up my own opinions, though.

    ---
    ■ Synchronet ■ Tinfoil Tetrahedron BBS telnet or ssh -p 2222 to tinfoil.synchro.net