Live data from Hacker News

Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

phoronix.com

91–100 of 144 posts

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#91
post #78
post #76

Earlier quoted context omitted.

It's just you. PHP.net documentation was always better than the rest, easy to read, some simple examples and with helpful comments. JavaDoc, MSDN had no comments for decades, little examples and the later one lacked lots of API parts. Show me one online documentation of a language that is/was better. Also great are the book "Programming in C 2nd ed" and "Programming Lua", and the Golang focus isn't bad. PHP.net 2017…

I'm not saying the otheres were better. I 'm just saying that PHP.net docs simply had false claims and they needed the users to comment and make them right. I don't wanna know how much hours I lost with that, haha. Well these days I simply look in the source, because it doesn't lie

What were the false claims?

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#92
post #15

Earlier quoted context omitted.

There's one thing none of those have that PHP has: Work with off-the-shelf managed hosting.

This is something programmers will never appreciate, and every small business on earth has already encountered Go build your client's new website in go, and then spend 80 hours trying to make it work with their $5/month hosting

Just switch them to a $5/mth Linodode VM and push your one-off prepared Docker image. They're now getting 1GB RAM for their money so no complaints.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#93
post #57
post #28

Earlier quoted context omitted.

It's weird for me. I used to write both Java and PHP in the past. Custom PHP framework we built took into account the way PHP is executed: you are stateless and need to setup everything on every request (runtime is fast to start with FPM and opcode cache). Namespaces based cheap autoloader worked great. No composer. We used singletons for getting the configuration and connections to DBs. There was almost no setup cod…

I switched jobs, and started with Symfony 3. The thing felt like some Java framework, but poorly documented and harder to use than it should be. It had lots and lots of setup code done before handling every request. There's a whole DI framework with it's own tons of setup code for every component. This is also the overarching feeling I get from the big PHP frameworks: Java envy. They picked an architecture which is p…

Drupal and Symfony have inherited the worst excesses of Java's AbstractSingletonProxyFactoryBuilderContainer culture. Laravel and Symfony also have a preference for docsting annotations which are even worse than Java.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#94

it's really astonishing to see PHP still alive and kicking, despite all the backlashes it has received over the years. whatever it is they are doing, they must be doing something right.

Long time PHP dev here. Note: These are my personal observation and opinion. The usage you see are mostly from people already invested in PHP. However, I'm starting to see fewer new PHP devs. Some of the talented devs I know of have migrated to other "cool" languages. There are fewer PHP jobs than they use to be. I also observed less activity in PHP related subreddits. Its position as the #1 web server language has a…

Yes, if you search Indeed.com's API by job title there are currently more Node.js jobs (384) than PHP (268) in London (excluding WordPress, Drupal, Joomla & Magento).

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#95

Earlier quoted context omitted.

Long time PHP dev here. Note: These are my personal observation and opinion. The usage you see are mostly from people already invested in PHP. However, I'm starting to see fewer new PHP devs. Some of the talented devs I know of have migrated to other "cool" languages. There are fewer PHP jobs than they use to be. I also observed less activity in PHP related subreddits. Its position as the #1 web server language has a…

I think that the cheap VPS is the ultimate cause. 15 years ago (when, BTW, Python was already a thing) you _had_ to use PHP, unless you had extra money to spend on a more "scalable" technology (so enterprises, who had money, frequently chose Java). It was a monopoly like JS was/is a monopoly - you want to write code for a browser - you'd better know JS. Now, between AWS and DO, you can with relative ease start up in…

Or Linode with 2x the RAM Digital Ocean offers.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#96

Earlier quoted context omitted.

Well, I specified "IMHO". That's the main issue that I have with PHP. I have no idea what they do at Facebook, and I don't have to work on the biggest community in the world that often. The problems I encounter in term of performance for websites/apps are along the lines of pages being super-slow because of the 100 JavaScript frameworks we like to use nowadays for the smallest of projects, my clients uploading 10MB i…

"As for coding yes—one issue I have is that not using PHP exclusively I get confused by the fact that the opposite of html_entity_decode is htmlentities and not html_entity_encode" Ah yes. You will probably have to hit 'tab' on your IDE with php - to type "html_entity_encode". But if this is too hard - Here you go, Try it out in python (careful of the 2/3 quirks!): Python: https://stackoverflow.com/questions/275174/h…

Does stacking of PHP's ternary still result in hard-to-predict behavior?

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#97

Earlier quoted context omitted.

Long time PHP dev here. Note: These are my personal observation and opinion. The usage you see are mostly from people already invested in PHP. However, I'm starting to see fewer new PHP devs. Some of the talented devs I know of have migrated to other "cool" languages. There are fewer PHP jobs than they use to be. I also observed less activity in PHP related subreddits. Its position as the #1 web server language has a…

I think that the cheap VPS is the ultimate cause. 15 years ago (when, BTW, Python was already a thing) you _had_ to use PHP, unless you had extra money to spend on a more "scalable" technology (so enterprises, who had money, frequently chose Java). It was a monopoly like JS was/is a monopoly - you want to write code for a browser - you'd better know JS. Now, between AWS and DO, you can with relative ease start up in…

To expand on thing-ness, the first public Python release was 26.5 years ago. 15 years ago Python was already 10+ years old and was a very popular language.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#98

I don't think PHP's main problem is speed. It's generally used for websites, and a few milliseconds aren't going to make a difference when pages are so bloated by JavaScript libraries to often be 5-10MB. PHP's problem IMHO is that I wouldn't be able to use it if it wasn't for autocomplete: inconsistent function names, inconsistent parameter order. The ecosystem is fine, there's Composer, PSR, Laravel. The problem is…

Really? So the main issue with php is a few functions have inconsistent parameter order? Ignore the massive speed improvements, composer package manager system or huge community. Good companies use php. I haven't met someone at facebook that can't code it. (please spare me the HHVM comment or how your intern friend does haskell in the basement). Have you read about python 2 vs 3? Have you actually seen real programmi…

Consistency in a language goes a long way. In the end it’s programmer efficiency that matters more than performance

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#99
post #21
post #3

Earlier quoted context omitted.

It's not a terrible experience, but it is truly baffling that anyone would start a project in it today. A good static type system is too useful and important.

That's the last thing I look for when evaluating a new language. Well, actually I came to dislike static typing so much that's a big point against languages IMHO. I concede that it would have saved me time with data occasionally going to the wrong argument/method/function but every time I understand that I'll have to type almost useless stuff like Map( , ) I hit back and return to HN home page. Moving to dynamic typi…

Thank you for the insightful comment, all of a sudden static typing increasing coding friction makes sense.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#100

I don't think PHP's main problem is speed. It's generally used for websites, and a few milliseconds aren't going to make a difference when pages are so bloated by JavaScript libraries to often be 5-10MB. PHP's problem IMHO is that I wouldn't be able to use it if it wasn't for autocomplete: inconsistent function names, inconsistent parameter order. The ecosystem is fine, there's Composer, PSR, Laravel. The problem is…

I work on a modern PHP 7.1 codebase, and I personally disagree:

> PHP's problem IMHO is that I wouldn't be able to use it if it wasn't for autocomplete: inconsistent function names, inconsistent parameter order.

I know the functions you're talking about, and they're definitely a wart, but approximately 0% of my day is spent actually calling them directly. I spent a lot of time working with eg, collection classes which extend a base collection class which, sure, calls one of the interchangable array_* functions with their endlessly inconsistent parameter order, but I'm not calling them. Similarly, a lot of code I write every single day relies on encoding and decoding HTML entities, and yes, the fact that it's html_entity_decode and htmlentities is certainly embarrassing, but again, it's all handled by a library.

It's an issue, but I'm not sure I'd find room for it on a top 10 list of issues with PHP. How about, say, the lack of generics? Now that's a flaw that actually impacts people using PHP professionally, whereas the htmlentities/html_entity_decode thing, in my experience, doesn't.

Post reply on HN