Live data from Hacker News

Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

phoronix.com

51–60 of 144 posts

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

#51

Earlier quoted context omitted.

> i tried to get them to change their long-standing, self-admitted improper ternary associativity [1] or at least deprecate it in v7 but it resulted in a huge bikeshed Oh man. Remember that drama in the internals when trying to remove T_PAAMAYIM_NEKUDOTAYIM ?

don't remind me.

good times.

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

#52

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

Pretty independent of recent improvements, but one thing I feel people are forgetting about PHP these days is that, when given to a good hosting provider, PHP is essentially "serverless" programming, but without the vendor lock-in stuff like AWS Lambda give you. (and without the hype) Admittedly, even on a good host it won't scale as ridiculously well as a lambda function does, but I'd wager scling from 1 to 1 millio…

PHP isn't serverless in the same way a lambda function is at all. You still need to host something that responds to HTTP requests and passes them along appropriately to PHP. Just because it has a share nothing model doesn't mean you don't need to provision servers. You still need to do 90% of the work.

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

#53

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

My biggest complaint is that it's associative arrays are different than objects. So serializing and unserializing json can become a nightmare. This is easily circumvented by being careful to be consistent. But big libraries like symfony will change your json around and break things. In node it's just not an issue

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

#54

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

Pretty independent of recent improvements, but one thing I feel people are forgetting about PHP these days is that, when given to a good hosting provider, PHP is essentially "serverless" programming, but without the vendor lock-in stuff like AWS Lambda give you. (and without the hype) Admittedly, even on a good host it won't scale as ridiculously well as a lambda function does, but I'd wager scling from 1 to 1 millio…

I get your point but also consider that messing around with installing php extensions and using pecl is more of a nuisance than just deploying your node_modules via something like rsync. The php community solves this by writing polyfill which seems like wasted effort (writing something in php that already exists as a php extension)

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

#55

Earlier quoted context omitted.

Pretty independent of recent improvements, but one thing I feel people are forgetting about PHP these days is that, when given to a good hosting provider, PHP is essentially "serverless" programming, but without the vendor lock-in stuff like AWS Lambda give you. (and without the hype) Admittedly, even on a good host it won't scale as ridiculously well as a lambda function does, but I'd wager scling from 1 to 1 millio…

PHP isn't serverless in the same way a lambda function is at all. You still need to host something that responds to HTTP requests and passes them along appropriately to PHP. Just because it has a share nothing model doesn't mean you don't need to provision servers. You still need to do 90% of the work.

I think he meant you can easily find $5 "unlimited" php web hosts. So for all intents and purposes it's serverless as in you can use it on a shared web host, where you do not have to manage the server because the hosting company does it. Not that it's literally serverless. Even lambda uses servers obviously. They just abstract it away which is what he meant. Clearly all cloud offerings are backed by servers, it's just abstracted away to varying degrees

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

#56

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…

> Its position as the #1 web server language has already been taken over by nodejs

How so? Because when I put a PHP script on a server with "" that is a one-liner and I'm sure it'll work for the next 20 years.

With nodejs, I have to implement the whole webserver and then my web app is also a server, even if it's "only" 20 lines of code and I need other tools to make sure that this server never crashes or automatically reboots and all that stuff.

Imho, the main benefit of PHP is: You can write a script today and because the language is mature, it doesn't change all the time and you can be quite confident that it'll keep running for another decade.

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

#57
post #28

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

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 perfectly sensible in Java, but slow by design in PHP. You also notice this in the language features being added, where gradually PHP is turning into Java. On the Java side instead there is Scala envy, with Java slowly turning into Scala.

I don't mind PHP taking good ideas from Java though, PHP 7.x is much improved and the community overall seems to be moving in the right direction: take the good ideas from Java, without taking on the worst excesses.

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

#58
post #40

Earlier quoted context omitted.

> i tried to get them to change their long-standing, self-admitted improper ternary associativity [1] or at least deprecate it in v7 but it resulted in a huge bikeshed Oh man. Remember that drama in the internals when trying to remove T_PAAMAYIM_NEKUDOTAYIM ?

For those that (like me) hadn't heard of it: https://philsturgeon.uk/php/2013/09/09/t-paamayim-nekudotayi...

Thanks for that link, that was a hilarious read. Highly recommended.

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

#59

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

Pretty independent of recent improvements, but one thing I feel people are forgetting about PHP these days is that, when given to a good hosting provider, PHP is essentially "serverless" programming, but without the vendor lock-in stuff like AWS Lambda give you. (and without the hype) Admittedly, even on a good host it won't scale as ridiculously well as a lambda function does, but I'd wager scling from 1 to 1 millio…

Are you referring to shared webhosting?

Because if so, there's quite a few drawbacks. You're generally not in any sort of scalable setup, no high availability, you're on a shared box with other customers, you are susceptible to IO constraints on the shared disks, etc. You're still going to need a database of some sort for most applications....

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

#60

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

It's still kickin'. I left the PHP world a few years ago, but I still have to go back occasionally to manage a few old projects. I recently upgraded one to PHP 7.*. It's soooooo much faster than older versions I consider it a must have for anyone working on PHP. That said one thing I don't regret is not having to deal with composer again. It's basically a shittier version of npm, with a fraction of the speed and a fr…

You mean not idempotent even with composer.lock in place? Would love to see a reproducible example.
Post reply on HN