Announcement

Collapse
No announcement yet.

Facebook's Hack Language Making Progress To Advance PHP

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

  • Facebook's Hack Language Making Progress To Advance PHP

    Phoronix: Facebook's Hack Language Making Progress To Advance PHP

    Earlier this year Facebook launched the Hack language powered by their HipHop Virtual Machine (HHVM) and being based off PHP. Good progress is being made on enhancing the language with interest in the project continuing to grow inside and outside of Facebook...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I wish PHP had better support for Unicode.
    It can be a problem with UTF-8 depending on if its with BOM or without BOM.

    I also wish there were decorators.

    Code:
    [Decorator] // C# style decorator
    public void Foo() { }
    
    @Decorator // Java style decorator
    public void Foo() { }
    Another thing PHP is lacking is multiple inheritance, so a class can implement more than one interface.

    For all PHP programmers who want to write good code:
    An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web

    We're a group of established PHP projects whose goal is to talk about commonalities between our projects and find ways we can work better together.

    We're a group of established PHP projects whose goal is to talk about commonalities between our projects and find ways we can work better together.


    The bad things about PHP:
    Last edited by uid313; 21 October 2014, 04:26 PM.

    Comment


    • #3
      Originally posted by uid313 View Post
      Another thing PHP is lacking is multiple inheritance, so a class can implement more than one interface.
      php already can implement more than one interface i.e.
      class LoadUserData implements FixtureInterface, ContainerAwareInterface
      Official documentation of DoctrineFixturesBundle, a bundle for Symfony applications


      Originally posted by uid313 View Post
      The bad things about PHP:
      http://www.phpwtf.org/
      This list is not complete. I saw longer list somewhere. The thing is that all of these things doesn't matter in real world. I'm living with them everyday.

      The real php problem from my POV is speed - lack of speed. C++ hello world web application in cppcms is 30 times faster than hello world in symfony framework.

      Comment


      • #4
        Originally posted by uid313 View Post
        I wish PHP had better support for Unicode.
        It can be a problem with UTF-8 depending on if its with BOM or without BOM.

        I also wish there were decorators.

        Code:
        [Decorator] // C# style decorator
        public void Foo() { }
        
        @Decorator // Java style decorator
        public void Foo() { }
        Another thing PHP is lacking is multiple inheritance, so a class can implement more than one interface.

        For all PHP programmers who want to write good code:
        An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web

        We're a group of established PHP projects whose goal is to talk about commonalities between our projects and find ways we can work better together.

        We're a group of established PHP projects whose goal is to talk about commonalities between our projects and find ways we can work better together.


        The bad things about PHP:
        http://www.phpwtf.org/
        Thank you for the references!

        Comment


        • #5
          Originally posted by michal View Post
          The real php problem from my POV is speed - lack of speed. C++ hello world web application in cppcms is 30 times faster than hello world in symfony framework.
          That just means Symfony is too bloated for simple tasks...

          Comment


          • #6
            Originally posted by michal View Post
            php already can implement more than one interface i.e.
            class LoadUserData implements FixtureInterface, ContainerAwareInterface
            Official documentation of DoctrineFixturesBundle, a bundle for Symfony applications




            This list is not complete. I saw longer list somewhere. The thing is that all of these things doesn't matter in real world. I'm living with them everyday.

            The real php problem from my POV is speed - lack of speed. C++ hello world web application in cppcms is 30 times faster than hello world in symfony framework.
            Makes me wish Python had gone with an interface-based design rather than MI as well. MI is just begging for trouble

            Comment


            • #7
              Originally posted by TheOne View Post
              That just means Symfony is too bloated for simple tasks...
              Not really. There are many cross language benchmarks - here is a first result from google search
              Update: There are newer benchmark results. This all began as a colleague of mine stated that Python was so damn slow for maths. Which really astonished me and made me check it out, as my father tol…


              php 5.3 is 5461% slower than c++ here...

              I'm afraid that it's the biggest problem that will be never solved, because introducing jit will not help here much.

              Comment


              • #8
                Originally posted by michal View Post
                Not really. There are many cross language benchmarks - here is a first result from google search
                Update: There are newer benchmark results. This all began as a colleague of mine stated that Python was so damn slow for maths. Which really astonished me and made me check it out, as my father tol…


                php 5.3 is 5461% slower than c++ here...

                I'm afraid that it's the biggest problem that will be never solved, because introducing jit will not help here much.
                In real world you'd use cache and do demanding stuff with other services or plugins.

                Comment


                • #9
                  Originally posted by caligula View Post
                  In real world you'd use cache
                  Cache is not the answer in many cases.

                  Originally posted by caligula View Post
                  and do demanding stuff with other services or plugins.
                  That's because php sucks in speed.

                  Comment


                  • #10
                    Originally posted by michal View Post
                    Cache is not the answer in many cases.



                    That's because php sucks in speed.
                    No, the idea is that you use the best tool for the job. PHP is the best tool for coordinating things and embedded C plugins are good for performance stuff.

                    Comment

                    Working...
                    X