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

  • #21
    Originally posted by CoderniX View Post

    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!
    I am aware there is something like release maintenance. I just say Java has a lead here. In PHP you even need migration guides for point releases, and Java is definitely not in the same basket as PHP, or C# in this regard. You can take your 1.2 code and throw it at JVM 8 and it will run happily (And much faster btw.).
    I never said PHP is stupid, and I have never written against PHP. It is a solid language I can live with (I am a pragmatist here, use programming languages same as spoken ones, not discussing their issues, but concentrate on applicability.), a tool, and it has its area of application, but Java has it too, what many here seem not to understand.

    Comment


    • #22
      Originally posted by CoderniX View Post

      ____



      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!
      I am aware there is something like release maintenance, but that has nothing to do with the point I was trying to made. With Java, take your 1.2 code, throw it at latest JVM 8, and it will run happily, and also much faster. You got many benefits of latest JVM just by switching it, the JVM. With PHP you have to check migration guides even for point releases!

      Now, I consider my self to be pragmatist here. I look at programming languages same as I look at spoken ones. There are many other factors beside 'perfect' syntax, which are IMO always more important. Documentation, community, availability etc. etc. So yes, I even appreciate and like PHP. It is only there are some other languages/tools I like/prefer bit more at the moment, but that can change in the feature.

      Anyhow, I jumped in because people made wrong claims about Java, not to bash PHP.

      Comment


      • #23
        Originally posted by reCAPTCHA View Post
        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.
        Java was used in Banking Apps and co not because it's superiority, but because few factors paced the way for it:

        - Banks and Corporations needed a Sophisticated Cross-Platform that does the Job, and I remember back then the complaining about the .Net being superior but not Cross-Platform, and as such back then the Billing and Audit Solution I have witnessed being purchased and used was from Gaya and imported from France, yet it was slow and shitty, and the future proved that.

        - Companies needed easy access via a GUI, still had to be cross-platform.

        - WebGUI wasn't a trend, and Browsers were shittier and crappier, hence all scripted languages were dropped.

        - PHP wasn't mature and neither was it backed and supported by any big boys, other languages might not even existed back then.

        - Java was seductive as Sun pushed it to thousands of universities and gave free access to academic tutos and the like, thus it was taught by default in almost every single computer degree around the world. Microsoft followed that route but after too late, they even gave their Server 2003 NT Kernel Source Code to universities, and I was amazed how beautifully was written, although I despised microsoft.

        - PHP didn't have OOP, and the need of classes and their re-use and re-implementation was a must in such Apps, hence C++ was too complicated, time consuming, and its errors were fatal as they affected the stack directly, the safer route was to go Java way.

        Things have changed now, and yeah I've seen some banking systems migrating to PHP and Python, and lots of Billing & Audits for Telecom Apps are shining with PHP.

        Also, if you use the standard Java 8 Libs, then I'm sorry to tell you PHP7 beats it in anyway you like about speed and CPU usage. Check the net for that and if you need I can refer you to the sources with the code to try for yourself.

        I'm not setting on Java, I'm just stating few things that I've seen people use against PHP, when it's clear they don't know what they're speaking about, and it happens that I never go with the wave and jump into the bandwagon, until I test, try, verify and conclude myself, and I'm very satisfied with PHP, let alone the road-map I'm looking to see soon.

        Have a nice day and enjoy.

        Comment


        • #24
          Originally posted by droste View Post

          Of course there was always a way to return nothing. It's done by simply not returning something

          In a previous version _explicit_ return types were introduced so you could tell that a function only returns a certain type. Not specifying any type as a return type now means two things: either something without a specific type is returned (the type may even switch depending on the input) or nothing is returned.
          What's new now is that you can now _explicitly_ say this function returns nothing (and the compiler makes sure that you don't return anything).
          Ah, I gotcha, makes sense now.

          Comment


          • #25
            Originally posted by CoderniX View Post
            Java was used in Banking Apps and co not because it's superiority, but because few factors paced the way for it:

            - Banks and Corporations needed a Sophisticated Cross-Platform that does the Job, and I remember back then the complaining about the .Net being superior but not Cross-Platform, and as such back then the Billing and Audit Solution I have witnessed being purchased and used was from Gaya and imported from France, yet it was slow and shitty, and the future proved that.

            - Companies needed easy access via a GUI, still had to be cross-platform.

            - WebGUI wasn't a trend, and Browsers were shittier and crappier, hence all scripted languages were dropped.

            - PHP wasn't mature and neither was it backed and supported by any big boys, other languages might not even existed back then.

            - Java was seductive as Sun pushed it to thousands of universities and gave free access to academic tutos and the like, thus it was taught by default in almost every single computer degree around the world. Microsoft followed that route but after too late, they even gave their Server 2003 NT Kernel Source Code to universities, and I was amazed how beautifully was written, although I despised microsoft.

            - PHP didn't have OOP, and the need of classes and their re-use and re-implementation was a must in such Apps, hence C++ was too complicated, time consuming, and its errors were fatal as they affected the stack directly, the safer route was to go Java way.

            Things have changed now, and yeah I've seen some banking systems migrating to PHP and Python, and lots of Billing & Audits for Telecom Apps are shining with PHP.

            Also, if you use the standard Java 8 Libs, then I'm sorry to tell you PHP7 beats it in anyway you like about speed and CPU usage. Check the net for that and if you need I can refer you to the sources with the code to try for yourself.

            I'm not setting on Java, I'm just stating few things that I've seen people use against PHP, when it's clear they don't know what they're speaking about, and it happens that I never go with the wave and jump into the bandwagon, until I test, try, verify and conclude myself, and I'm very satisfied with PHP, let alone the road-map I'm looking to see soon.

            Have a nice day and enjoy.
            Are shining with PHP... Well someone maybe wrote a front end for something with PHP, it is possible, people do that. You say they are using it for data processing (CPython Ok, but larger systems are almost always in Java.)? I don't believe you. What you typed doesn't make any sense. Also your claimings that PHP 7 interpreter (Doesn't matter which one, Zend, default one, or HHVM) run faster than 'standard 8 libraries'.... Also yes please, any kind of reference to backup that would be appreciated. From my PoV totally insane, but ok I could be wrong, please convince me.

            Comment


            • #26
              Originally posted by reCAPTCHA View Post

              Are shining with PHP... Well someone maybe wrote a front end for something with PHP, it is possible, people do that. You say they are using it for data processing (CPython Ok, but larger systems are almost always in Java.)? I don't believe you. What you typed doesn't make any sense. Also your claimings that PHP 7 interpreter (Doesn't matter which one, Zend, default one, or HHVM) run faster than 'standard 8 libraries'.... Also yes please, any kind of reference to backup that would be appreciated. From my PoV totally insane, but ok I could be wrong, please convince me.
              That means once proven then you stamp Java as crappier.

              No problem, for the Telecom case study moving from Java to PHP, there's Algerie Telecom (Algeria) moving from Java to PHP, from the French Gaya (http://www.gayasoftware.com/) get in touch and they'll let you know.

              For the Java 8 Standard Lib being slower than PHP, then here you go:



              Source code to run the tests yourself:

              PHP7: https://github.com/famzah/langs-perf...ter/primes.php
              Java 8: https://github.com/famzah/langs-perf...er/primes.java

              I quote the original Author saying:

              The clear winner among the script languages is… PHP 7.

              Yes, that’s not a mistake. Apparently the PHP team did a great job! The rumor that PHP 7 is really fast confirmed for this particular benchmark test. You can also review the PHP 7 infographic by the Zend Performance Team.

              Comment


              • #27
                Originally posted by CoderniX View Post

                That means once proven then you stamp Java as crappier.

                No problem, for the Telecom case study moving from Java to PHP, there's Algerie Telecom (Algeria) moving from Java to PHP, from the French Gaya (http://www.gayasoftware.com/) get in touch and they'll let you know.

                For the Java 8 Standard Lib being slower than PHP, then here you go:

                https://blog.famzah.net/2016/02/09/c...enchmark-2016/

                Source code to run the tests yourself:

                PHP7: https://github.com/famzah/langs-perf...ter/primes.php
                Java 8: https://github.com/famzah/langs-perf...er/primes.java

                I quote the original Author saying:
                So non-std lib means 'standard java 8 library' to you? But ok I will check it, and comment after. I only asked for Java vs PHP benchmarks, and thanks for providing your source, for the rest, why should anyone care if one company is moving to PHP? And for 'that's not mistake', maybe you take things for granted too fast? One guy already provided Java code 5 times faster, but author didn't like it. The speed of Java mostly comes from its JIT compiler, if it didn't run, the benchmark is irrelevant from my PoV. It only tests one aspect of Java. For most if not all backend applications the startup time of JVM is irrelevant (You start servlet container of application server once, not per request, how PHP interpreter runs), as well as first few runnings when code is not yet optimized by JIT.

                Edit:

                Sorry for non-std library, I misunderstood it, there is another 'standard' Java 8 below. But, non-std lib is pure, and standard Java code, which runs 1.3 sec vs > 6 sec PHP 7. Why do you think the way author implemented its Java code is the right one? As I said, I will check the code, still haven't done it.
                Last edited by reCAPTCHA; 14 June 2016, 05:27 PM.

                Comment


                • #28
                  Originally posted by reCAPTCHA View Post

                  So non-std lib means 'standard java 8 library' to you? But ok I will check it, and comment after. I only asked for Java vs PHP benchmarks, and thanks for providing your source, for the rest, why should anyone care if one company is moving to PHP? And for 'that's not mistake', maybe you take things for granted too fast? One guy already provided Java code 5 times faster, but author didn't like it. The speed of Java mostly comes from its JIT compiler, if it didn't run, the benchmark is irrelevant from my PoV. It only tests one aspect of Java. For most if not all backend applications the startup time of JVM is irrelevant (You start servlet container of application server once, not per request, how PHP interpreter runs), as well as first few runnings when code is not yet optimized by JIT.

                  Edit:

                  Sorry for non-std library, I misunderstood it, there is another 'standard' Java 8 below. But, non-std lib is pure, and standard Java code, which runs 1.3 sec vs > 6 sec PHP 7. Why do you think the way author implemented its Java code is the right one? As I said, I will check the code, still haven't done it.
                  I clearly mentioned 3 factors:

                  1- Standard Java 8 vs standard PHP7 (As HHVM is even faster than php7!)
                  2- Speed
                  3- CPU usage

                  In all the 3 Java 8 lacks behind PHP7 by %100 to %400.

                  Also check the code, it tests the language performance not something else, and please try it yourself.

                  Not just one company, since the provided solutions varied: in-house, Chinese, and Eastern European, which means others are adopting it as well.

                  I almost dumped PHP, but the 5.6 gave me hope, and PHP7 blown me away.

                  Comment


                  • #29
                    Originally posted by CoderniX View Post

                    I clearly mentioned 3 factors:

                    1- Standard Java 8 vs standard PHP7 (As HHVM is even faster than php7!)
                    2- Speed
                    3- CPU usage

                    In all the 3 Java 8 lacks behind PHP7 by %100 to %400.

                    Also check the code, it tests the language performance not something else, and please try it yourself.

                    Not just one company, since the provided solutions varied: in-house, Chinese, and Eastern European, which means others are adopting it as well.

                    I almost dumped PHP, but the 5.6 gave me hope, and PHP7 blown me away.
                    That is a lie. Standard Java has blown PHP away (check the forum, click non-std lib link.), the issue is that the guy is intentionally misinterpreting things and obviously lie when he says he just compares 'language performance' (By not using features of other languages like Java or C++, intentionally, or b/c he cannot batter, but to me everything points to 1st.). non-std lib is actually pure, simple, normal Java code, which even satisfies his silly criteria (Which it self is a nonsense, so Java can run even faster. Code example in forum, above 'non-std lib'). No third party libraries were used. He just likes to be a prick so simple Java class is a non standard fucking library to him, you know. Probably nothing better came to his mind after another guy met his requirements (Unfortunately it worked on some people. You, for example, compared few lines of simple, common Java code to HHVM.).

                    array class in PHP has nothing to do with Java's ArrayList data structure. Also arrays in Java have nothing in similar with PHP array class. Simple, normal array (int a = new int[3]) is thousands time faster, you only cannot initialise it (the array), 'because it changes the algorithm', so he tries, although unsuccessfully, to develop in Java in the same way as he would in PHP (What only an imbecile or one with ill intentions would do.). Btw the Java class which is much more similar to PHP array is LinkedHashMap, so why ArrayList then(Because performance are constant vs O(n).)?
                    Further, In Java there are tons of (easily adaptable) different data structures (usually chosen according to situation). As already mentioned, one can make a 'real', simple array of primitive types like 'int[] intArray = new int[10];', but no, it is wrong to use this data structure despite the fact it is much faster than anything similar in PHP, because one changes the 'algorithm'.

                    One more time, he has intentionally chosen criteria which exclude features/possibilities of Java (But Java is not the only language which suffers/could perform much better there.), and reduced them somewhere to PHP level.

                    Use faster data structure, 'algorithm changed', initialise size of a data structure 'algorithm changed', and no JIT optimisation (As if that matters, b/c language performance.).
                    Language performance benchmark my ass.

                    Following his 'logic' one could 'prove' that speed of development in Python is worse/same compared to the one of C language.
                    Last edited by reCAPTCHA; 20 June 2016, 08:26 PM.

                    Comment

                    Working...
                    X