News for hackers. Stuff that matters.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by skrebbel on Sunday July 30, 2017 @12:53AM (#14884492)
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 million req/s in an hour and then back again is a pretty marginal use of Lambda. All the other advantages boil down to not having to manage your own server. Just deploy the code, and that's it.

Well, PHP has had this for decades. And I believe that people should really consider this when choosing a language. I don't know of any other language that you can code a backend in without thinking about servers and daemons and keeping nginx up to date, without getting vendor locked-in to something like Lambda or Heroku.

This is also why I don't really see the point of Hack/HHVM for any new product: If you're going to install some random runtime on some server as well, there's probably more ergonomic languages you can choose.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by open-source-ux on Sunday July 30, 2017 @07:53AM (#14885546)
I completely agree with you about the ease of hosting with PHP.

In fact, it's baffling that other popular languages for web development - such as Python and Ruby - have failed to address this issue of easy server installation. Developers underestimate how important this is.

If you want to sell a self-hosted solution to your customers, especially if they are small or medium-size businesses, it's impossible to offer an easy self-install solution using other languages (i.e. easy enough for non-technical users to follow instructions for install success).

Having a ridiculously easy web app installation process for servers would unlock countless opportunities for developers to reach more users or customers.

Programmer Jeff Attwood wrote about this in a critical post about PHP:

"If you want to produce free-as-in-whatever code that runs on virtually every server in the world with zero friction or configuration hassles, PHP is damn near your only option."

Attwood goes on to say we should:

"build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible." [1]

That was written in 2012. And yet here we are in 2017 and there is still no other language that matches PHP for ease of server install, or for choice of hosting providers. I repeat: developers underestimate how important this is.

[1] https://blog.codinghorror.com/the-php-singularity/

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by wwweston on Sunday July 30, 2017 @02:40PM (#14887213)
This. When I got my first explanation of "serverless" (i.e. the details of the runtime and server are managed by the vendor for you) I almost laughed and said "Oh, like PHP on shared hosting."

I've wondered for years where else this aspect of PHP might be appreciated and show up in another ecosystem. In retrospect it almost seems obvious that it'd more likely appear in the form of convergent evolution combining another benefit that's higher status in the industry if less frequently needed.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by cthalupa on Sunday July 30, 2017 @05:00AM (#14885085)
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 by bkanber on Sunday July 30, 2017 @08:03AM (#14885583)
> 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.

As you describe acceptable use-case for 99% of all projects.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by joshribakoff on Sunday July 30, 2017 @03:36AM (#14884887)
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 by fredsted on Sunday July 30, 2017 @05:47AM (#14885235)
I don't think pecl sees much use now, depending on your package manager you can just install most modules from there ("apt-get install php-imagick")
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by debaserab2 on Sunday July 30, 2017 @03:25AM (#14884858)
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 by joshribakoff on Sunday July 30, 2017 @03:38AM (#14884896)
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 by cutler on Sunday July 30, 2017 @08:35AM (#14885671)
For $5 a month you can get a Linode VPS with 1GM RAM. After the one-off learning curve of Docker you can image these servers and get much more for your money than what any shared hosting provider has to offer. Better still, you're not tied to PHP either.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by Can_Not on Sunday July 30, 2017 @10:53AM (#14886193)
You're missing the point. The shared PHP host can be $5-$20 per year and handle bursts in excess of 1GB (assuming you're not grossly oversold, which is also common in VPSs).