Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why PHP still exists - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Why PHP still exists

2»

Comments

  • netomxnetomx Moderator, Veteran

    @KuJoe so do I. I have just written an automatic crane for a factory - using c++ and php. It just works

  • risharderisharde Patron Provider, Veteran

    When I first began programming, I started in PERL which I still believe is a powerful language. However (perhaps due to my lack of knowledge) PERL was a little harder to plug code in between html tags and when I discovered PHP, I remember this was actually the primary reason for the switch (at that time, I never looked really at performance, memory usage and those sort of "technical" aspects). After discovering PHP and it being supported by Dreamweaver, for me that was the icing on the cake. Also, I've never had a situation web-based wise where PHP didn't do what I want it to do and for some reason, documentation was easily accessible. In fact, I remember I would download the .chm file (a windows help file format basically) which I could use to program offline and just to switch back to the comparison for PERL, I had some difficulty finding offline documentation (this was in the days where I had a 56K connection and "limit hours of internet" - pay per hour so online documentation wasn't really a good option.

    Technically speaking, PHP as many have mentioned before contains what I consider as minor flaws which I can more than overlook such as similar functions with arguments in a different order which sometimes require me to look at the documentation. I don't understand why some people are saying that it can be a programming mess to program in PHP - so far, I really don't see it that way and furthermore, isn't that up to the programmer and not so much the language? I'm sure you could program badly in other languages as well so I am a bit lost on what exactly people mean. Anyways, don't take it personal, not really here to step on toes.

    Honestly, php is the reason I haven't switched to try python and ruby because I guess so far, whatever challenges I've faced, I've been able to accomplish a solution in PHP. Overall, I don't see PHP losing much of its popularity at this point in time (but I could be very wrong).

    With all that being said, I have an open mind for all programming languages...

  • marcmmarcm Member

    @Raymii - I like PHP... what are you on about?

  • raindog308raindog308 Administrator, Veteran

    @risharde said: PERL was a little harder to plug code in between html tags

    There's HTML::Mason, which is pretty much "perl in tags" like php. I worked with it 10 years ago and it was nice, but don't know what's up with it lately. The userbase is probably one-tenth of a percent of the php userbase I'd wager.

  • If I will write a product software, PHP is my highest priority. Because of bazillion customer than can easily deploy it. Compare to others.

  • risharderisharde Patron Provider, Veteran

    @raindog308 thanks for the heads up, will do some research on it, much appreciated ;) @jcaleb yes true, I forgot to mention that ;)

  • NexusNexus Member

    @Raymii said: What do you guys think of PHP?

    For me, I might sound weird, but I get a Euphoria feeling when I code. Especially in PHP. Not just php though, if it's css and javascript, it's a good feeling but not as strong. I know this sounds really weird but it's true. Time literally flys by when creating a small project or script. I believe PHP will be around for a long time.

    Sadly, this is not taught in any universities or schools around my city. I don't know if it's just location, the language isn't "strong" enough, or merely just because, but I wish it was, i'd take that class NP. They should be teaching PHP in highschool instead of those retarded HTML classes..

  • netomxnetomx Moderator, Veteran

    @Nexus said: I get a Euphoria feeling when I code.

    Amen

  • AdducAdduc Member
    edited March 2013

    @gaarai said: PHP has PECL, which is a sort of inferior, PHP version of CPAN. However, I know of basically 0 big projects that make use of any of those libraries.

    Composer, released early-2012, has garnered support from a lot of major PHP projects as the de facto dependency manager. Unlike PECL, which works on a system level to install libraries, composer works on a per project basis. I can have a version of TCPDF in use on one site that's different than the version of TCPDF in use on another site on the same server.

  • wlanboywlanboy Member
    edited March 2013

    First of all: Thank you for the link to veekun.
    A really good blog post about the struggles you can have with a programming language. He is really talking about every single aspect. If I would have enough free time I would copy/paste the post and replace "php" with "Java" and would redo every single chapter. Basically it is a good checklist you can use for every language.

    Back to topic:
    Every programming environment is easy if you do not use extensions.

    • Basic php scripts -> fine
    • Basic ruby scripts -> fine
    • Basic phyton scripts -> fine
    • Basic Java servlets -> fine

    But if you are using:

    • PHP + PECL ->
    • Ruby + gems ->
    • Phyton + Python module->
    • Java + jars ->
      It all depends on the quality of the module/extension. And you have a bad welcome to the dependency hell. You have to build/configure the hell out of you environment.

    Want to run two different apps depending on:

    • Different version of a PECL module
    • Different version of a gem
    • Different version of a Phyton module
    • Different version of a jar
      Well - good luck.

    If I am working on a small project I can build it on every software stack I want. But if I have to use database "A" and have to use component "B" which I can only talk to if I am using module "C" things are not that easy anymore.
    And you are bound to an application sever version, a database server version, on a defined version of some libraries.

    But that cage of dependencies can be build in every programming language.

    PS:
    And please do not tell anyone php is portable. Just thinking about php modules, apache vs lighttpd vs ngix, rewrite rules, ...
    Because if you have to compare php to ruby/python/java you have to compare php+webserver to ruby/python/java + modules.

  • dnomdnom Member

    @wlanboy said: Want to run two different apps depending on:

    @wlanboy said: Different version of a Phyton module

    python virtualenv rules! :D

  • @dnom said: python virtualenv rules! :D

    +1

  • And please do not tell anyone php is portable. Just thinking about php modules, apache vs lighttpd vs ngix, rewrite rules, ...
    Because if you have to compare php to ruby/python/java you have to compare php+webserver to ruby/python/java + modules.

    -1. PHP does not need any webserver to run.

  • dnomdnom Member

    @Bogdacutuu said: PHP does not need any webserver to run.

    Interesting. Can you run wordpress without using a webserver other than PHP itself?
    I always thought PHP requires a webserver for websites.

  • @dnom said: Interesting. Can you run wordpress without using a webserver other than PHP itself?

    I always thought PHP requires a webserver for websites.

    I said PHP in general, you can run CLI scripts without any problem (on Linux at least). Also, the comparison was between php+webserver and ruby/python/java + modules. Ruby/python/java don't need webservers either.

  • @dnom said: I always thought PHP requires a webserver for websites.

  • @Bogdacutuu said: I said PHP in general

  • joepie91joepie91 Member, Patron Provider
    edited March 2013

    @Nexus said: For me, I might sound weird, but I get a Euphoria feeling when I code. Especially in PHP. Not just php though, if it's css and javascript, it's a good feeling but not as strong. I know this sounds really weird but it's true. Time literally flys by when creating a small project or script. I believe PHP will be around for a long time.

    I have a similar thing. In my case, this is primarily because PHP allows me to get into "The Zone" without getting interrupted. In Python, for example, figuring out how to do something often entails reading significant amounts of text in the documentation. This shift of focus from "writing code" to "reading and understanding a comprehensive explanation of a concept" is what takes me out of "The Zone". With PHP, I can just have one php.net and Google tab open, and instantly find the reference for whatever I'm trying to do, without having to really shift my focus... essentially, I'm still concentrated on my code, and just reading one or two documentation sentences off-hand.

    It may be different for you, of course, but this is why I enjoy writing PHP much more than writing in for example Python.

    @wlanboy said: And please do not tell anyone php is portable. Just thinking about php modules, apache vs lighttpd vs ngix, rewrite rules, ...

    Anything built on my (quite small) PHP framework will work cross-HTTPd. Including request routing (which you would normally use rewrite rules for). There are a few minor differences between HTTPds (such as passing on HTTP status code, as FastCGI implementations do not allow doing so directly), but aside from some HTTPd-specific implementations, PHP is very portable.

    EDIT: I am refering to my framework in particular, to indicate that even if there are things that do not work cross-HTTPd, there are options that do. The only workaround/abstraction for this in my framework is the http_status_code($code) function, which returns the appropriate HTTP response header depending on SAPI used.

  • raindog308raindog308 Administrator, Veteran

    @joepie91 said: have a similar thing. In my case, this is primarily because PHP allows me to get into "The Zone" without getting interrupted. In Python, for example, figuring out how to do something often entails reading significant amounts of text in the documentation.

    I suspect that's mainly because you're a php developer, though. If you'd been doing python all your life, it'd likely be your zone language.

    I like that new term - what is your zone language? :-)

    Quite true though that about "The Zone". There's a definite brain chemistry shift if you're an artist, say, and you paint for a couple hours. You may lose track of time, not notice that music has stopped, etc. It's quite pleasant in the way mowing the lawn never is...

  • joepie91joepie91 Member, Patron Provider

    @raindog308 said: I suspect that's mainly because you're a php developer, though. If you'd been doing python all your life, it'd likely be your zone language.

    No. It's an actual problem related to the amount of attention that the Python documentation requires. If it were just because I'm "used to PHP", I would have the same issue for PHP-related things I am not familiar with... and that's not the case.

  • mpkossenmpkossen Member
    edited March 2013

    @joepie91 said: No. It's an actual problem related to the amount of attention that the Python documentation requires. If it were just because I'm "used to PHP", I would have the same issue for PHP-related things I am not familiar with... and that's not the case.

    At least Python's documentation is mostly correct whereas PHP's documentation is mediocre at best (and completely broken for some part).

    I use both Python and PHP, PHP during my full-time job.

  • CakePHP ... there I said it. What? You can't get with this..

  • dnwkdnwk Member

    @rds100 said: Why COBOL still exists?

    COBOL really exist? Do you know a language called LOGO?

  • rds100rds100 Member
    edited March 2013

    @dnwk said: COBOL really exist?

    Ask your bank about COBOL ;-)
    And LOGO was something where you entered some human-like definitions/sentences and it derived results from it?

    hmm no, i was wrong about LOGO, it was some turtle graphic thing.

  • dnwkdnwk Member

    Unless you are a professional coder(do coding at lease 8-10 hours a day), PHP might be the best option for you.

  • @rds100 said: hmm no, i was wrong about LOGO, it was some turtle graphic thing.

    Ha, LOGO . . . that brings back some memories.

  • ChanChan Member

    PHP is like the first language I've learned and it's easy syntax really helped me when I first got started. After PHP I learned a bit of JS and JQuery but now it seems I'm stuck at scripting languages... I'm trying to learn Java now but I'm too spoiled by PHP's relatively easy to understand syntax lol

  • It exists because it's unified and globalized.
    It's globalized because it's well built, maintained and easy to use.

Sign In or Register to comment.