Announcement

Collapse
No announcement yet.

PHP 7.1 Alpha Released With Void Return Type, Multi Catch

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Java is less shitty to work with? Do you even code? I couldnt imagina coding for website in anything else. Except maybe c++ but such tools dont really exist.

    Comment


    • #12
      I'm really baffled by the level of ignorance people might have and refuse to acknowledge.

      Someone's asking if there are people still using PHP in a way that no one still uses it, well let me tell you that a big part of the web is powered by PHP, and it happens that PHP is one of the fastest Interpreted Languages out there, and you go check the benchmarks, it beats Perl, Python and you name it by miles.

      Facebook is written in PHP, HHVM and that's so far the only way to say the words PHP and Compiler in one sentence. Oh, also most Forum Boards, such as this are written and will stay being written in PHP, be it VBulletin, XenForo, IPBoard, PHPBB, SMF...etc (Go count how many forums are out there in all the worlds' languages)

      PHP isn't Compiled, it doesn't have a Compiler, it has an Interpreter instead, and it gets Interpreted.

      Coming from an Assembly and ANSI C background, I'd say PHP was a piece of cake, and when I see people complaining about it, I get that WTH feeling wondering whether these people had an idea how PHP is compared to the other previous languages.

      PHP came with the idea of not needing to declare variables beforehand or assign a type to them or to the functions, hence the functions will return by default a true or false statement resembled in 0 or a positive number, usually 1, unless you state:

      return null;

      Now, you can state that the function will return nothing, regardless of whether you omit the "return" instruction altogether.

      When you have a big script and you're using your IFs and Conditions and do actions afterwards based on that, the return value can mess up your code pretty much, so you'll be obliged to use the return null thing.

      Java on the other hand is bloat-y, resource-heavy, long, and crappy except for developing for Android, and make no mistake, the regular Java JVM isn't the Dalvik VM! The syntax is the same, but the VM isn't, which explains the lack of bloatness on Android! Mono-C# on Linux beats Java in every corner, although I hate both!

      Well, for several years now, my work is PHP, and now people are even demanding for more, that we've seen the creation of Laravel, which is making hits nowadays, and it's just an extra-level of simplification added to PHP.

      I've read lots of complaints about PHP, not a single one convinced me, although I have 12+ years worth of PHP work. So, next time please post something constructive, or at least factual or do your research first before you click on the "Post Reply" button.

      _____

      P.S:
      Just wanted to add that most of the CMSes out there are written in PHP even the most common/used eCommerce platforms, and they're still being updated even weekly, just as an example:

      PrestaShop
      Magento
      ZenCart
      WordPress
      BuddyPress
      Joomla
      Drupal
      ...etc
      Last edited by CoderniX; 10 June 2016, 11:43 PM.

      Comment


      • #13
        Originally posted by cj.wijtmans View Post
        Java is less shitty to work with?
        yes.
        Do you even code?
        yes.
        I couldnt imagina coding for website in anything else.
        Never said Java was better than PHP, just that PHP is a pain to work with.

        Javascript is also shitty to work with, but it's VERY VERY VERY VERY rare to do large pure PHP/Javascript where you write ALL THE CODE FROM SCRACH, 99% of their modern usage is through frameworks that hide the inane shit in their own methods and give you some saner interface, and you write just the glue code.

        The same can be said for Java, and more or less anything else, shitty or not.
        But please note, using a good framework does not mean the language itself is not shitty to work with.

        Originally posted by CoderniX
        Java on the other hand is bloat-y, resource-heavy, long, and crappy except for developing for Android,
        Nah, even on Android is very meh. Good to do simple crap applications, for true performance you must use native code (C++).

        Coming from an Assembly and ANSI C background, I'd say PHP was a piece of cake, and when I see people complaining about it, I get that WTH feeling wondering whether these people had an idea how PHP is compared to the other previous languages.
        Sure, let's show how good is PHP by pulling up Assembly and C that have nothing in common (apart some C-inspired syntax).
        What about making some comparisons with other interpreted languages that have a semi-similar scope to PHP?

        Let's also conveniently forget that most people nowadays sees Assembly and C for a few years mostly when at school/university, so languages with non-shit syntax like say Python are much more interesting for them.

        Comment


        • #14
          I'm not arguing about PHP's popularity - lots of great websites and website building packages are powered by PHP.

          It's great for getting websites up and running, is very quick to pick up and do something useful, but as a counterpart of that, it makes it easy for bad coders to write stuff that works, with lots of security holes and other problems.

          I run a joomla site for my wife's business.. but I have it locked down so that many features aren't accessible, and I can see people trying to hack into it all the time from the apache 403 logs! Most of the attacks are from the many vulnerabilities fixed and patched.
          Last edited by speculatrix; 11 June 2016, 08:32 AM.

          Comment


          • #15
            PHP consumes less RAM, and it consumes it per need/request, while Java has an application server, or at least servlet container running all the time, consuming much more RAM for each page request compared to PHP. But, saying that PHP is more performant is more than silly. I guest only a WEB designer who write simple CRUD scripts can compare PHP to Java in that regard. Java runs circles around PHP and any other interpreted language. Another thing is that dynamic languages are not really well suited for writing big or complicated business applications (Although, using microservices architecture is often a better choice.), and Java, Scala, etc. (static languages) are better choice for multiple reasons. Static code is easier to maintain, read and debug, for performance you have threads to utilise CPU cores better, and for calculations, performances are compared to that of C, sometimes can even be better, due to JIT optimizations.

            As always, it depends on task and situation. PHP is better suited for projects like simple web pages, forums, blogs. Consumes less performance, cheap or even gratis hosting available everywhere. Otherwise I would choose Ruby on Rails or Django over PHP and its frameworks at any times of a day.

            Another issue with PHP is application maintenance. If one has written an application in say Java, 7 years ago, one updates libraries, everything works, no code changes required. Things are more complicated if one uses one of modern Rails like frameworks, Play for example.

            With PHP? Write an application using PHP 5, here it comes 6, and now 7, no backward compatibility, Zend 1, than Zend 2 comes out. Good luck maintaining that.
            Last edited by reCAPTCHA; 11 June 2016, 12:13 PM.

            Comment


            • #16
              Originally posted by starshipeleven View Post
              Javascript is also shitty to work with, but it's VERY VERY VERY VERY rare to do large pure PHP/Javascript where you write ALL THE CODE FROM SCRACH, 99% of their modern usage is through frameworks that hide the inane shit in their own methods and give you some saner interface, and you write just the glue code.
              A couple of months ago, I finished a full project related to LA municipality purely written in PHP, not even a single HTML/JavaScript line, just CLI PHP and a full blown up SOAP PHP App, Email Syncing, CSV creation/update/extraction/upload...etc

              Did a Bailiff's Council Web App, purely in PHP, HTML, JavaScript, and MySQLi, and didn't touch any Framework whatsoever, mind you, had to do the whole 3 months project over SSH using Vim because of the restrictive access nature!

              Most of my work is building Web-Apps and/or Services from scratch, and it mandates to not use any Framework to keep it less heavy and won't have extra-dependencies, unless you're speaking about a fresh-graduate who was taught at school that frameworks are the oxygen of work, and Zend O2 itself!


              Originally posted by starshipeleven View Post
              The same can be said for Java, and more or less anything else, shitty or not.
              But please note, using a good framework does not mean the language itself is not shitty to work with.
              I hate frameworks altogether, and would love to use a vanilla version of any language, or write my own tiny and well optimized framework that will build up by time and will do exactly and only what I need it to do, not to server a billion of human being needs that I have no interest into.

              Originally posted by starshipeleven View Post
              Nah, even on Android is very meh. Good to do simple crap applications, for true performance you must use native code (C++).
              Unless you need an OpenGL ES App on Android, I don't see a point to fall back to use the NDK, that just doesn't justify the time and resources at all, even for a Realtime App, it would be much simpler, quicker and may be faster to use JavaScript realtime backend, such as Horizon http://horizon.io/


              Originally posted by starshipeleven View Post
              Sure, let's show how good is PHP by pulling up Assembly and C that have nothing in common (apart some C-inspired syntax).
              What about making some comparisons with other interpreted languages that have a semi-similar scope to PHP?
              You've missed the whole point. People complains about the Language Built Structure of PHP and dealing with it, and that has nothing to do with being Compiled or Interpreted, and my point stands still, coming from a background of writing micro-bootloaders and co, and writing C Device Drivers, and Socket Apps, I've seen what the word shitty means dealing with a language's complexity, so yeah, PHP was/is a piece of cake.

              Also, comparing to Python, I find PHP more rational and logical, and would understand someone who has never been through the other langs not to see that or know the difference, I've spoken to a dozen of univ grads, and I can see from where they're coming from.

              Originally posted by starshipeleven View Post
              Let's also conveniently forget that most people nowadays sees Assembly and C for a few years mostly when at school/university, so languages with non-shit syntax like say Python are much more interesting for them.
              I'd use Python if I'm going to write a Plugin for image-processing for let's say a Software like The Foundry Nuke or Autodesk Maya, or if I want to do something quickly I'd even jump to Django, but would never write a full blown up Web App purely in Python, unless I want it to have a GUI Interface on the Desktop.

              Otherwise, for such cases and students, I'd advise them to get a look at Go, Go would beat the heck out of most of the Modern Languages nowadays, and its speed of handling millions of requests literally by second is astounding, so check out Go, and it's Compiled into native code by the way and it's cross-platform as well.


              ____

              Originally posted by speculatrix
              I'm not arguing about PHP's popularity - lots of great websites and website building packages are powered by PHP.

              It's great for getting websites up and running, is very quick to pick up and do something useful, but as a counterpart of that, it makes it easy for bad coders to write stuff that works, with lots of security holes and other problems.

              I run a joomla site for my wife's business.. but I have it locked down so that many features aren't accessible, and I can see people trying to hack into it all the time from the apache 403 logs! Most of the attacks are from the many vulnerabilities fixed and patched.
              I co-sign that, for a language attracting millions of developers, there'll will be thousands of bad coders, and it's sad that these days people are hiring the least expensive coders, as long as the seen result is the intended one, and not the expected underlying code that does the magic. It's almost become synonymous to Out-Sourcing to just say Low-Cost Bad Coders, and it's really saddening.

              Another thing, your exact issue is the reason for companies paying real coders $3-15k for a single website, that runs on a Bespoke Solution written from Scratch exactly for the client, that does what he needs only and is ultimately secure. Another sad thing, is when some use this to promote their mediocre work and get paid the same as a way better hard-working developer.

              ____

              Originally posted by reCAPTCHA
              With PHP? Write an application using PHP 5, here it comes 6, and now 7, no backward compatibility, Zend 1, than Zend 2 comes out. Good luck maintaining that.
              Well, there's a reason the same is maintained for years to come with the same security patches that are found in the higher releases, and if an App as you stated was written 7 years ago, that it doesn't need to be upgraded to a higher release that brings dozens if not hundreds of new features that won't benefit the 7 year old script, as the speed diff would be marginal.

              I'm not speaking about the ability of running several PHP Apps on the same Server using different versions/releases of PHP ranging from PHP 5.3 to 7.

              Also, the backward compatibility is broken even in C, C++, C#, Java or any other language, there'll always be Deprecations, otherwise it means that the old faults/mistakes haven't been resolved, although I'd agree that PHP has a faster pace, and I find that for the fact of being Modernized and Catching up to the new needs.

              PHP is very permissive when it comes to its community's feedback, and we've seen a lot of implementations found in other langs, which you won't see in other platforms, also you'll see dramatic and sometimes astronomical speed enhancements if you compare the old PHP to the newer ones, and that won't be the case either for other scripted languages, which means that a re-write may occur, and it has already occurred by the way to improve the code quality.

              ____

              By the end of the day, the language is as good as the developer using it, and just remember, these programming languages are just tools, and if you find any tool that it suffices your needs and does the job, then you should use it without hesitation, even if that would be GWBasic. Damn, I loved GWBasic!

              Comment


              • #17
                I am a PHP developer for, around 8 years, or so.
                Probably earning the same money or more, than many Java developers, for example.
                I worked with over 100 millions pounds revenue companies, a year. They use PHP.
                If you have experience in programming, you definitely know that tool is just a tool( I develop recently in Python and some Java as well).
                As long as it makes sense, use it. If not- switch.
                PHP has tons of issues, but many of them are being removed with time.
                I am the first person to say that PHP language has some shitty places and bad developers pick it up quickly.
                It is so easy to write something without knowing what you're doing.
                For me PHP is shitty language with great ecosystem(good libraries, some fix shitty language, but still, good community, easy access, many shitty developers ;p)
                And where it doesn't fit - I use what fits there.
                The problems with most high traffic website is, at least from my perspective, bad DB design/choice, bad designed infrastructure and poor code level quality(guess what, Java or Net can be also written badly, surprise).
                If programming language was the main issue, my work would be so easy.
                I would just educate developers in my team more.

                For me the way PHP is going now, for example with PHP 7 branch, is just great.
                It is still a long way, but things getting better very fast.
                If you use microservices, is even easier.
                Where PHP doesn't get along very well, rewrite this service with Java/Go, whatever you think is better.


                Originally posted by reCAPTCHA View Post

                As always, it depends on task and situation. PHP is better suited for projects like simple web pages, forums, blogs. Consumes less performance, cheap or even gratis hosting available everywhere. Otherwise I would choose Ruby on Rails or Django over PHP and its frameworks at any times of a day.

                Another issue with PHP is application maintenance. If you have written an application in say Java, 7 years ago, usually one just updates libraries, everything works, no code corrections required. Things are more complicated if one uses one of modern Rails like frameworks, Play for example.

                With PHP? Write an application using PHP 5, here it comes 6, and now 7, no backward compatibility, Zend 1, than Zend 2 comes out. Good luck maintaining that.
                Oh really?
                PHP 6, 7 ?
                I didn't know that PHP 6 exist but, because it looks like you're an expert in this area, you know your stuff.
                Backward compatibility? Like Python 2 to 3 jump? That excellent level?
                PHP is very careful to keep backward compatibility.
                That is the main reason why some shitty things still are there and will be for a long time.
                You can run PHP 5 code on PHP 7, ok 99.99% of time.
                Symfony 3 code works out of the box with Symfony 2.
                Apart from really rare edge cases.
                For me the main thing that makes maintenance hard is a poor code quality(high coupling, not testable code, lack of tests, a lot of "magic" etc).
                Despite the language you use.
                I am pretty sure you have no idea what you're talking about.
                Last edited by senkal; 11 June 2016, 12:34 PM.

                Comment


                • #18
                  Originally posted by reCAPTCHA View Post
                  With PHP? Write an application using PHP 5, here it comes 6, and now 7, no backward compatibility, Zend 1, than Zend 2 comes out. Good luck maintaining that.
                  PHP 6?

                  HL3 confirmed.

                  Comment


                  • #19
                    Originally posted by senkal View Post
                    I am a PHP developer for, around 8 years, or so.
                    Probably earning the same money or more, than many Java developers, for example.
                    I worked with over 100 millions pounds revenue companies, a year. They use PHP.
                    If you have experience in programming, you definitely know that tool is just a tool( I develop recently in Python and some Java as well).
                    As long as it makes sense, use it. If not- switch.
                    PHP has tons of issues, but many of them are being removed with time.
                    I am the first person to say that PHP language has some shitty places and bad developers pick it up quickly.
                    It is so easy to write something without knowing what you're doing.
                    For me PHP is shitty language with great ecosystem(good libraries, some fix shitty language, but still, good community, easy access, many shitty developers ;p)
                    And where it doesn't fit - I use what fits there.
                    The problems with most high traffic website is, at least from my perspective, bad DB design/choice, bad designed infrastructure and poor code level quality(guess what, Java or Net can be also written badly, surprise).
                    If programming language was the main issue, my work would be so easy.
                    I would just educate developers in my team more.

                    For me the way PHP is going now, for example with PHP 7 branch, is just great.
                    It is still a long way, but things getting better very fast.
                    If you use microservices, is even easier.
                    Where PHP doesn't get along very well, rewrite this service with Java/Go, whatever you think is better.




                    Oh really?
                    PHP 6, 7 ?
                    I didn't know that PHP 6 exist but, because it looks like you're an expert in this area, you know your stuff.
                    Backward compatibility? Like Python 2 to 3 jump? That excellent level?
                    PHP is very careful to keep backward compatibility.
                    That is the main reason why some shitty things still are there and will be for a long time.
                    You can run PHP 5 code on PHP 7, ok 99.99% of time.
                    Symfony 3 code works out of the box with Symfony 2.
                    Apart from really rare edge cases.
                    For me the main thing that makes maintenance hard is a poor code quality(high coupling, not testable code, lack of tests, a lot of "magic" etc).
                    Despite the language you use.
                    I am pretty sure you have no idea what you're talking about.
                    Well when I was working on my last PHP project PHP 6 was still in development. I completely forgot that 6 had been skipped on the end. Now, you cannot use PHP 5 code with PHP 7 when you use framework like Zend, which is self not backward compatible (Many companies prefer Zend, probab. b/c they consider it to be the official framework, developed by PHP developers. ). I doubt your 99,99% are true, but I would like it to be so. I was speaking from my previous experience with PHP. 4 and 5, and mainly Zend framework with 5. I do not follow PHP development so close any more, so you got me here. In case 100% is true, congrats to developers. Even without it PHP 7 is an improvement, and the language goes in the right direction (for now) from what I have seen.

                    Regarding Java, backward compatibility was always one of the highest priorities for Sun, and still is for Oracle, and is one of the reasons the language didn't evolve like for example C# did (IIRC they broke the compatibility with C# 3.0), but for a good reason IMO. You are probably aware that Java systems run high critical tasks 24/7 in Telecoms, Banks etc. and I believe you can imagine that updating and maintaining billing systems for example is bit more complicated that updating a web page, blog or whatever.

                    I jumped in because people who probably have no clue about Java were bashing it with comments about its inferior performance. Java wipes ass with PHP when we talk about performance (speed, not memory consumption), and development of large business applications.

                    Regarding PHP, I actually enjoyed developing in it, and for many tasks (or not that many, but some at least) I would prefer it over Java, although, nowadays I would choose rather Django or RoR for such or similar tasks, when possible.
                    Last edited by reCAPTCHA; 12 June 2016, 06:05 PM.

                    Comment


                    • #20
                      Originally posted by starshipeleven View Post

                      PHP 6?

                      HL3 confirmed.
                      As mentioned in my previous answer, don't follow PHP development any more (so closely. From time to time I read news. related to it), and I even forgot reading about it being canceled few years ago. Back than when I was still developing in it, 6 was still expected, features had been discussed in conferences, even books were written for it, migration was a topic etc.

                      Comment

                      Working...
                      X