r/lolphp • • Sep 19 '17

HHVM dropping PHP

http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html
69 Upvotes

31 comments sorted by

11

u/marcini82 Sep 21 '17

That is logical. PHP5 is old, Facebook wants to focus on Hack, and there is no good reason to use HHVM as a runtime for PHP7 by anybody else, when native PHP7 is such big performance improvement that it can easily compete with HHVM. I don`t see any lol here.

6

u/TheBuzzSaw Sep 21 '17

I don`t see any lol here.

Facebook is the PHP poster child. The fact that Facebook is done supporting vanilla PHP is big LOL #1. No more saying Facebook is some shining example of PHP.

PHP7 only came about due to competition. Now its only major competition is dropping out of the game. That's LOL #2. Hope you're ready for the language to stagnate for another 15 years.

14

u/flyingkiwi9 Oct 11 '17

Facebook went from $0 -> $Billions on the back of PHP.

I would still call that a poster child of PHP. In fact it encompasses the ideology of PHP perfectly. Make it work, then when you're a billion dollar company you can get technical.

5

u/DrLeoMarvin Oct 16 '17

I dunno, I was at phptek this year in Atlanta and a lot of the people that were involved in building and releasing 7 were there talking and just hanging out. They were all super enthusiastic and sharing things to come in the next releases. I think it's got a new energy after how big of an impact 7 has made.

1

u/Danack Sep 22 '17

PHP7 only came about due to competition.

I've seen this claim a couple of times, do you have anything to back it up?

1

u/dotancohen Sep 24 '17

The state of PHP development before HHVM. Before HHVM came out, the previous two PHP point releases happened with three-year intervals. After HHVM came out, PHP point releases happen every year consistently.

PHP 4.0: 2000 | PHP 5.0: 2004 | PHP 5.1: 2005 | PHP 5.2: 2006 | PHP 5.3: 2009 | HHVM: 2011 | PHP 5.4: 2012 | PHP 5.5: 2013 | PHP 5.6: 2014 | PHP 7.0: 2015 | PHP 7.1: 2016 | PHP 7.2: Slated for Nov 2017

2

u/SaraMG Oct 05 '17

HHVM had zero to do with PHP adopting more regular release cycles.

However, PHP7's performance gains were heavily cribbed from HHVM, so the point about having competition does stand.

17

u/deusex_ Sep 19 '17

How's this /r/lolphp?

13

u/hurenkind5 Sep 19 '17

Eh, one could count that as both lolphp and lolhhvm.

9

u/Synes_Godt_Om Sep 20 '17

Or the usual contrived, forced attempt at laughing at something that really isn't funny anymore.

lolphp was a good source of gotchas back in "5.3" days, but now? Not so much.

15

u/PlasmaSheep Sep 20 '17

You can leave whenever you like.

1

u/[deleted] Sep 23 '17

Maybe.. Still Hack is a much more decent language to work with than PHP is. I think Hack dropping PHP is a good thing, now the language can grow without messing with the PHP core devs and their never ending madness.

33

u/[deleted] Sep 19 '17

The long used reason for still using PHP...."but facebook uses it". Not anymore!

6

u/deusex_ Sep 19 '17

i think they took PHP where it was good for them but it never caught on massively

php7 is a whole different story than hhvm, another good one though

2

u/enchufadoo Sep 19 '17

But they weren't using it before this announcement.

6

u/mikeputerbaugh Sep 20 '17

They were (are) using Hack, which is for all intents and purposes a non-standard fork of the PHP language specification.

8

u/FredL2 Sep 22 '17

PHP language specification

They finally came around to writing one?

2

u/OneWingedShark Sep 22 '17

I don't think so... I've never seen one, at least.

0

u/[deleted] Sep 19 '17

[deleted]

6

u/Schmittfried Sep 19 '17

It is a good idea.

0

u/[deleted] Sep 19 '17

[deleted]

4

u/Schmittfried Sep 19 '17

I don't see how it breaks MVC. It does not. It's just a template engine directly integrated into the language just like LINQ is SQL directly integrated into the language. This adds type safety and other safeguards that would usually be missing with an external template engine / ORM without language support. Neither XHP nor LINQ break solid architectural patterns. Adhering to those is up to the developer, not the tools he uses.

0

u/[deleted] Sep 19 '17

[deleted]

3

u/fred_emmott Sep 21 '17

This is not how we use it internally; I'm not sure if it was at the time, or if this example was just structured like this to be more approachable in the context of a blog post.

Edit: https://github.com/hhvm/user-documentation/tree/master/src/site is a fair bit closer of an example to how we use it internally

3

u/fred_emmott Sep 21 '17

Though yes, we do use it in a way that breaks MVC; see the section on 'Asynchronous XHP' on https://code.facebook.com/posts/858739974205250/announcing-xhp-js-building-efficient-user-interface-components-with-hack-react-and-xhp/

TL;DR: we feel that encapsulation of a logical component is more important in some situations, and it can have performance benefits due do reducing over-fetching.

1

u/[deleted] Sep 23 '17

Well React seems quite popular, its basically the same idea, but in JavaScript.

2

u/youstolemyname Sep 20 '17

So what about the transpiler?

2

u/beerdude26 Sep 20 '17

Hasn't been supported in a loooong time.

0

u/[deleted] Sep 21 '17

[deleted]

1

u/fred_emmott Sep 21 '17 edited Sep 21 '17

Eventually we're hoping to drop all the PHP stuff we don't like; for now, we're building replacements, and keeping the existing ones until "pure hack" projects are practical. For hack arrays, strings, and math operations, that's in the HSL, and we'll be adding more - and consistency/predictability is one of the primary goals behind that project.

Though yes, it's another standard library :p https://xkcd.com/927/

1

u/[deleted] Sep 22 '17

Why not Python, Ruby, Ocaml or Haskell .... Anything else? What does Hack have over them?

3

u/fred_emmott Sep 22 '17

It's very hard to answer this without getting into one of the usual language wars, but I'll try for Python and Ruby:

  • some parts of PHP are awesome for web development - e.g. the idea that a request is the entire lifecycle of your program. This isn't just about dev workflow - the 'nothing is shared between requests unless you explicitly store it somewhere' thing is great

  • the hack typechecker

Python and Ruby also both have things they do better than Hack and PHP; which one is 'best' depends heavily on the context.

I've not worked enough with Ocaml or Haskell to try to answer for them.

1

u/[deleted] Sep 22 '17

Interestingly I actually have to agree with your reasoning.

You're right today is not a day for a language war. Have you played with haxl?