HHVM: Difference between revisions
→Overview: small grammar fix |
|||
(31 intermediate revisions by 28 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Process virtual machine developed by Meta}} |
|||
{{Use mdy dates|date=August 2014}} |
{{Use mdy dates|date=August 2014}} |
||
{{Infobox software |
{{Infobox software |
||
| name = HHVM |
| name = HHVM |
||
| logo = HHVM logo.svg |
| logo = HHVM logo.svg |
||
| logo size = |
| logo size = x64px |
||
| logo alt = HHVM logo, featuring white uppercase "HHVM" letters on a black background, with stylized triangular geometric shapes on the left |
| logo alt = HHVM logo, featuring white uppercase "HHVM" letters on a black background, with stylized triangular geometric shapes on the left |
||
| logo caption = |
| logo caption = |
||
| latest release version = {{wikidata|property|preferred|references|edit|Q18150679|P348|P548=Q2804309}} |
|||
⚫ | |||
| latest release date = {{start date and age|{{wikidata|qualifier|preferred|single|Q18150679|P348|P548=Q2804309|P577}}}} |
|||
⚫ | |||
| developer = [[Meta Platforms]] |
|||
⚫ | |||
| url = https://www.facebook.com/notes/facebook-engineering/the-hiphop-virtual-machine/10150415177928920 |
| url = https://www.facebook.com/notes/facebook-engineering/the-hiphop-virtual-machine/10150415177928920 |
||
| title = The HipHop Virtual Machine |
| title = The HipHop Virtual Machine |
||
| date = |
| date = December 9, 2011 | access-date = August 2, 2014 |
||
| author = Jason Evans | publisher = [[ |
| author = Jason Evans | publisher = [[Meta Platforms]] |
||
}}</ref> |
}}</ref> |
||
⚫ | |||
⚫ | |||
⚫ | |||
| url = https://github.com/facebook/hhvm/wiki/Building-and-installing-hhvm-on-CentOS-7.x |
| url = https://github.com/facebook/hhvm/wiki/Building-and-installing-hhvm-on-CentOS-7.x |
||
| title = Building and installing HHVM on CentOS 7.x |
| title = Building and installing HHVM on CentOS 7.x |
||
| date = |
| date = May 26, 2015 | access-date = June 12, 2015 |
||
| publisher = [[ |
| publisher = [[Meta Platforms]] | website = github.com |
||
}}</ref> |
}}</ref> [[OCaml]]<ref>{{cite web |
||
| url = https://github.com/facebook/hhvm/wiki/Building%20the%20Hack%20Typechecker |
| url = https://github.com/facebook/hhvm/wiki/Building%20the%20Hack%20Typechecker |
||
| title = Building the Hack typechecker |
| title = Building the Hack typechecker |
||
| date = |
| date = September 10, 2014 | access-date = June 12, 2015 |
||
| publisher = |
| publisher = Meta | website = github.com |
||
}}</ref>{{Efn|Only the [[Hack (programming language)|Hack]]'s [[Data type|type]]-checking ({{Mono|hh_server}} and {{Mono|hh_client}}) and code-formatting ({{Mono|hh_format}}) [[Command-line utility|command-line utilities]] and [[Daemon (computing)|daemons]] bundled together with the HipHop Virtual Machine are written in [[OCaml]].}} and [[Rust (programming language)|Rust]]<ref>{{cite web |title=Facebook's HHVM Begins Seeing Rust Rewrite - Phoronix |url=https://www.phoronix.com/scan.php?page=news_item&px=Facebook-Rust-HHVM | |
}}</ref>{{Efn|Only the [[Hack (programming language)|Hack]]'s [[Data type|type]]-checking ({{Mono|hh_server}} and {{Mono|hh_client}}) and code-formatting ({{Mono|hh_format}}) [[Command-line utility|command-line utilities]] and [[Daemon (computing)|daemons]] bundled together with the HipHop Virtual Machine are written in [[OCaml]].}} and [[Rust (programming language)|Rust]]<ref>{{cite web |title=Facebook's HHVM Begins Seeing Rust Rewrite - Phoronix |url=https://www.phoronix.com/scan.php?page=news_item&px=Facebook-Rust-HHVM |access-date=29 August 2019}}</ref> |
||
| operating system = |
| operating system = |
||
| platform = |
| platform = |
||
| license = [[PHP License]] and [[Zend License]]<ref name="license">{{cite web |
| license = [[PHP License]] and [[Zend License]]<ref name="license">{{cite web |
||
| url = https://github.com/facebook/hhvm#license |
| url = https://github.com/facebook/hhvm#license |
||
| title = facebook/hhvm: License |
| title = facebook/hhvm: License |
||
| |
| access-date = August 2, 2014 |
||
| publisher = [[Facebook]] | website = github.com |
| publisher = [[Facebook, Inc.]] | website = github.com |
||
}}</ref> |
}}</ref> |
||
| website = {{URL |
| website = {{Official URL}} |
||
}} |
}} |
||
'''HipHop Virtual Machine''' ('''HHVM''') is an [[Open-source software|open-source]] |
'''HipHop Virtual Machine''' ('''HHVM''') is an [[Open-source software|open-source]] virtual machine based on [[Just-in-time compilation|just-in-time (JIT) compilation]] that serves as an execution engine for the [[Hack (programming language)|Hack programming language]]. By using the principle of JIT compilation, Hack code is first transformed into intermediate '''HipHop bytecode''' ('''HHBC'''), which is then dynamically translated into [[x86-64]] [[machine code]], optimized, and natively executed.<ref>{{cite conference |
||
| url = https://dl.acm.org/citation.cfm?id=3192374 |
| url = https://dl.acm.org/citation.cfm?id=3192374 |
||
| title = HHVM JIT: A Profile-Guided, Region-Based Compiler for PHP and Hack |
| title = HHVM JIT: A Profile-Guided, Region-Based Compiler for PHP and Hack |
||
| date = |
| date = June 20, 2018 |
||
| last = Ottoni |
| last = Ottoni |
||
| first = Guilherme |
| first = Guilherme |
||
Line 48: | Line 50: | ||
| url = https://github.com/facebook/hhvm |
| url = https://github.com/facebook/hhvm |
||
| title = facebook/hhvm |
| title = facebook/hhvm |
||
| |
| access-date = August 2, 2014 |
||
| publisher = |
| publisher = Meta Platforms | website = github.com |
||
}}</ref> This contrasts with PHP's usual [[Interpreted language|interpreted]] execution, in which the [[Zend Engine]] transforms PHP [[source code]] into [[opcode]]s that serve as a form of [[bytecode]], and executes the opcodes directly on the Zend Engine's virtual [[CPU]].<ref>{{cite web |
}}</ref> This contrasts with PHP's usual [[Interpreted language|interpreted]] execution, in which the [[Zend Engine]] transforms PHP [[source code]] into [[opcode]]s that serve as a form of [[bytecode]], and executes the opcodes directly on the Zend Engine's virtual [[CPU]].<ref>{{cite web |
||
| url = http://www.phpbuilder.com/articles/application-architecture/optimization/php-and-zend-engine-internals.html |
| url = http://www.phpbuilder.com/articles/application-architecture/optimization/php-and-zend-engine-internals.html |
||
| title = PHP and Zend Engine Internals |
| title = PHP and Zend Engine Internals |
||
| date = |
| date = April 28, 2014 |
||
| access-date = September 23, 2014 |
|||
⚫ | |||
| author = Kaushik Pal |
|||
⚫ | |||
⚫ | |||
| archive-url = https://web.archive.org/web/20140915042514/http://www.phpbuilder.com/articles/application-architecture/optimization/php-and-zend-engine-internals.html |
|||
| archive-date = September 15, 2014 |
|||
⚫ | |||
}}</ref> |
|||
HHVM is developed by [[ |
HHVM is developed by [[Meta Platforms|Meta]], with the project's source code hosted on [[GitHub]];<ref>[https://github.com/facebook/hhvm HHVM source code on GitHub]</ref> it is licensed under the terms of the [[PHP License]] and [[Zend License]].<ref name="initial-release" /><ref name="license" /> |
||
== Overview == |
== Overview == |
||
Line 63: | Line 70: | ||
| url = https://www.facebook.com/notes/facebook-engineering/speeding-up-php-based-development-with-hiphop-vm/10151170460698920 |
| url = https://www.facebook.com/notes/facebook-engineering/speeding-up-php-based-development-with-hiphop-vm/10151170460698920 |
||
| title = Speeding up PHP-based development with HHVM |
| title = Speeding up PHP-based development with HHVM |
||
| date = |
| date = November 29, 2012 | access-date = August 2, 2014 |
||
| author = Drew Paroski | publisher = [[ |
| author = Drew Paroski | publisher = [[Meta Platforms]] |
||
}}</ref><ref>{{cite web |
}}</ref><ref>{{cite web |
||
| title = Announcement on GitHub removing HPHPc support |
| title = Announcement on GitHub removing HPHPc support |
||
| url = https://github.com/facebook/hiphop-php/commit/fc5b95110ff75110ad55bb97f7c93a8c4eb68e3b |
| url = https://github.com/facebook/hiphop-php/commit/fc5b95110ff75110ad55bb97f7c93a8c4eb68e3b |
||
| date = |
| date = February 19, 2013 | access-date = May 24, 2013 |
||
| publisher = [[ |
| publisher = [[Meta Platforms]] | website = github.com |
||
}}</ref> Based on the gained experience and aiming to solve issues introduced by HPHPc, |
}}</ref> Based on the gained experience and aiming to solve issues introduced by HPHPc, Meta decided in early 2010 to create a JIT-based PHP [[virtual machine]]. Issues associated with HPHPc included reaching a [[Plateau effect|plateau]] for further performance improvements, a fundamental inability to support all features of the PHP language, and difficulties arising from specific time- and resource-consuming development and deployment processes.<ref name="performance" /> In Q1 2013, the production version of the facebook.com website stopped using HPHPc and switched to HHVM. |
||
Following the JIT compilation principle, HHVM first converts the executed |
Following the JIT compilation principle, HHVM first converts the executed code into an [[intermediate language]], the high-level [[bytecode]] HHBC. HHBC is a bytecode format created specifically for HHVM, appropriate for consumption by both [[Interpreter (computing)|interpreters]] and just-in-time compilers. Next, HHVM dynamically ("just-in-time") translates the HHBC into x86-64 machine code, [[Optimizing compiler|optimized]] through dynamic analysis of the translated bytecode. Finally, it executes the x86-64 machine code.<ref name="initial-release" /><ref name="performance" /><ref>{{cite web |
||
| url = https://github.com/facebook/hhvm/blob/master/hphp/doc/bytecode.specification |
| url = https://github.com/facebook/hhvm/blob/master/hphp/doc/bytecode.specification |
||
| title = HipHop Bytecode v1 revision 18 |
| title = HipHop Bytecode v1 revision 18 |
||
| date = |
| date = July 31, 2014 | access-date = May 24, 2013 |
||
| publisher = [[ |
| publisher = [[Meta Platforms]] | website = github.com |
||
}}</ref> As a result, HHVM has certain similarities to the virtual machines used by other programming languages, including the [[Common Language Runtime]] (CLR, for the [[C Sharp (programming language)|C#]] language) and [[Java virtual machine]] (JVM, for the [[Java (programming language)|Java]] language). |
}}</ref> As a result, HHVM has certain similarities to the virtual machines used by other programming languages, including the [[Common Language Runtime]] (CLR, for the [[C Sharp (programming language)|C#]] language) and [[Java virtual machine]] (JVM, for the [[Java (programming language)|Java]] language). |
||
HHVM brings many benefits in comparison with HPHPc, and |
HHVM brings many benefits in comparison with HPHPc. HHVM uses the same execution engine when deployed in both production and development environments, while supporting integration between the execution engine and the [[HPHPd]] [[debugger]] in both environment types; as a result, maintaining [[HPHPi]] (HipHop interpreter) separately as a development utility is no longer needed as it was the case with HPHPc. HHVM also eliminates the lengthy [[Software build|builds]] required by HPHPc to run programs, resulting in much simpler development and deployment processes than it was the case with HPHPc.<ref name="initial-release" /> Finally, versions of HHVM before 4.0 have almost complete support for the entire PHP language (as defined by the official implementation of PHP version 5.4), including the support for the <code>create_function()</code> and <code>eval()</code> constructs, which was impossible with HPHPc.<ref>{{cite web |
||
| url = https://github.com/facebook/hiphop-php/issues/716 |
| url = https://github.com/facebook/hiphop-php/issues/716 |
||
| title = facebook/hhvm: About upgrade to PHP 5.4 engine |
| title = facebook/hhvm: About upgrade to PHP 5.4 engine |
||
| date = May 2013 | |
| date = May 2013 | access-date = August 2, 2014 |
||
| website = github.com |
| website = github.com |
||
}}</ref><ref>{{cite web |
}}</ref><ref>{{cite web |
||
| url = https://github.com/facebook/hhvm/wiki |
| url = https://github.com/facebook/hhvm/wiki |
||
| title = facebook/hhvm: Home |
| title = facebook/hhvm: Home |
||
| date = |
| date = May 8, 2014 | access-date = August 2, 2014 |
||
| publisher = [[ |
| publisher = [[Meta Platforms]] | website = github.com |
||
}}</ref> |
|||
}}</ref> Furthermore, HHVM uses the same execution engine when deployed in both production and development environments, while supporting integration between the execution engine and the [[HPHPd]] [[debugger]] in both environment types; as a result, maintaining [[HPHPi]] (HipHop interpreter) separately as a development utility is no longer needed as it was the case with HPHPc. HHVM also eliminates the lengthy [[Software build|builds]] required by HPHPc to run PHP programs, resulting in much simpler development and deployment processes than it was the case with HPHPc.<ref name="initial-release" /> |
|||
Together with HHVM |
Together with HHVM 3.0,<ref>{{cite web |
||
| url = https://hhvm.com/blog/4349/hhvm-3-0-0 |
|||
| title = HHVM 3.0.0 |
|||
| date = March 28, 2014 | access-date = December 26, 2022 |
|||
| author1 = Paul Tarjan |
|||
⚫ | |||
}}</ref> Meta also released [[Hack (programming language)|Hack]], a derivative of PHP<ref>{{cite magazine |
|||
| url = https://www.wired.com/wiredenterprise/2014/03/facebook-hack/ |
| url = https://www.wired.com/wiredenterprise/2014/03/facebook-hack/ |
||
| title = Facebook Introduces 'Hack,' the Programming Language of the Future |
| title = Facebook Introduces 'Hack,' the Programming Language of the Future |
||
| date = |
| date = March 20, 2014 | access-date = April 15, 2014 |
||
| author = Cade Metz | magazine = [[Wired (website)|Wired]] |
| author = Cade Metz | magazine = [[Wired (website)|Wired]] |
||
}}</ref><ref>{{cite web |
}}</ref><ref>{{cite web |
||
| url = https://code.facebook.com/posts/264544830379293/hack-a-new-programming-language-for-hhvm/ |
| url = https://code.facebook.com/posts/264544830379293/hack-a-new-programming-language-for-hhvm/ |
||
| title = Hack: a new programming language for HHVM |
| title = Hack: a new programming language for HHVM |
||
| date = April 2014 | |
| date = April 2014 | access-date = March 23, 2014 |
||
| author1 = Julien Verlaguet | author2 = Alok Menghrajani |
| author1 = Julien Verlaguet | author2 = Alok Menghrajani |
||
| publisher = [[Facebook]] | website = code.facebook.com |
| publisher = [[Facebook]] | website = code.facebook.com |
||
}}</ref> that allows programmers to use both [[dynamic typing]] and [[static typing]] |
}}</ref> that allows programmers to use both [[dynamic typing]] and [[static typing]] (a concept also known as [[gradual typing]]), and allows [[Data type|types]] to be specified for [[Function (programming)|function]] [[Argument (computer programming)|arguments]], function [[return value]]s, and [[class properties]]. However, Hack does not provide complete [[backward compatibility]] since it removes several PHP features, such as the <code>[[goto]]</code> statement and dynamic [[Variable (computer science)|variable]] names.<ref>{{cite web |
||
| url = http://radar.oreilly.com/2014/04/facebooks-hack-hhvm-and-the-future-of-php.html |
| url = http://radar.oreilly.com/2014/04/facebooks-hack-hhvm-and-the-future-of-php.html |
||
| title = Facebook's Hack, HHVM, and the future of PHP |
| title = Facebook's Hack, HHVM, and the future of PHP |
||
| date = |
| date = April 3, 2014 | access-date = August 2, 2014 |
||
| author = Josh Lockhart | publisher = [[O'Reilly Media]] |
| author = Josh Lockhart | publisher = [[O'Reilly Media]] |
||
}}</ref><ref>{{cite web |
}}</ref><ref>{{cite web |
||
| url = http://docs.hhvm.com/manual/en/hack.annotations.php |
| url = http://docs.hhvm.com/manual/en/hack.annotations.php |
||
| title = Hack and HHVM: Type Annotations (Hack Manual) |
| title = Hack and HHVM: Type Annotations (Hack Manual) |
||
| access-date = March 25, 2014 |
|||
| accessdate = {{date|2014-03-25|mdy}} |
|||
| website = docs.hhvm.com |
| website = docs.hhvm.com |
||
}}</ref><ref>{{cite web |
}}</ref><ref>{{cite web |
||
| url = http://docs.hhvm.com/manual/en/hack.otherrulesandfeatures.typeinference.php |
| url = http://docs.hhvm.com/manual/en/hack.otherrulesandfeatures.typeinference.php |
||
| title = Hack and HHVM: Type Inference (Hack Manual) |
| title = Hack and HHVM: Type Inference (Hack Manual) |
||
| access-date = March 25, 2014 |
|||
| accessdate = {{date|2014-03-25|mdy}} |
|||
| website = docs.hhvm.com |
| website = docs.hhvm.com |
||
| archive-url = https://web.archive.org/web/20140326062812/http://docs.hhvm.com//manual/en/hack.otherrulesandfeatures.typeinference.php |
|||
⚫ | |||
| archive-date = March 26, 2014 |
|||
| url-status = dead |
|||
⚫ | |||
| url = http://docs.hhvm.com/manual/en/hack.unsupported.php |
| url = http://docs.hhvm.com/manual/en/hack.unsupported.php |
||
| title = Hack and HHVM: Unsupported PHP Features in Hack (Hack Manual) |
| title = Hack and HHVM: Unsupported PHP Features in Hack (Hack Manual) |
||
| |
| access-date = April 2, 2014 |
||
| archive-url = https://web.archive.org/web/20151104213753/http://docs.hhvm.com/manual/en/hack.unsupported.php |
|||
| archive-date = 2015-11-04 |
|||
| website = docs.hhvm.com |
| website = docs.hhvm.com |
||
}}</ref> |
}}</ref> |
||
In September 2017, it was announced that version 3. |
In September 2017, it was announced that version 3.30 would be the last version of HHVM to officially support PHP, and that HHVM will only support Hack going forward.<ref>{{cite web |
||
| url = https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.html |
|||
| title = Ending PHP Support, and The Future Of Hack |
|||
| date = September 12, 2018 | access-date = December 26, 2022 |
|||
| author = Fred Emmott |
|||
}}</ref> This was due to differences and incompatibilities in PHP 7.<ref>{{Cite web|url=https://www.infoworld.com/article/3226489/web-development/forget-php-facebooks-hhvm-engine-switches-to-hack-instead.html|title=Forget PHP! Facebook's HHVM engine switches to Hack instead|last=Krill|first=Paul|date=2017-09-20|website=InfoWorld|language=en|access-date=2019-02-06}}</ref> HHVM 4.0, released in February 2019, was the first version without support for PHP.<ref>{{cite web |
|||
| url = https://hhvm.com/blog/2019/02/11/hhvm-4.0.0.html |
|||
| title = HHVM 4.0.0 |
|||
| date = February 11, 2019 | access-date = December 26, 2022 |
|||
| author = Fred Emmott |
|||
⚫ | |||
== Performance == |
== Performance == |
||
Line 130: | Line 158: | ||
| url = http://www.hhvm.com/blog/2813/we-are-the-98-5-and-the-16 |
| url = http://www.hhvm.com/blog/2813/we-are-the-98-5-and-the-16 |
||
| title = We are the 98.5% (and the 16%) |
| title = We are the 98.5% (and the 16%) |
||
| date = |
| date = December 19, 2013 | access-date = August 2, 2014 |
||
| website = hhvm.com |
| website = hhvm.com |
||
}}</ref> |
}}</ref> |
||
Line 137: | Line 165: | ||
{{Portal|Computer programming}} |
{{Portal|Computer programming}} |
||
* [[Parrot virtual machine]] |
* [[LLVM]] |
||
*[[Parrot virtual machine]] |
|||
* [[Phalanger (compiler)|Phalanger]] |
* [[Phalanger (compiler)|Phalanger]] |
||
Line 147: | Line 176: | ||
== External links == |
== External links == |
||
{{Sister project links|wikt=no|commons=no|n=no|q=no|s=no|b=no|voy=no|v=no|d=no|species=no|species_author=no|m=no|mw=HHVM}} |
|||
* {{Official website |
* {{Official website}} |
||
Line 157: | Line 185: | ||
[[Category:2011 software]] |
[[Category:2011 software]] |
||
[[Category:C++ software]] |
[[Category:C++ software]] |
||
[[Category: |
[[Category:Rust (programming language) software]] |
||
[[Category:Facebook software]] |
[[Category:Facebook software]] |
||
[[Category:Free |
[[Category:Free and open source compilers]] |
||
[[Category:OCaml software]] |
[[Category:OCaml software]] |
||
[[Category:PHP software]] |
[[Category:PHP software]] |
||
[[Category:Software using the PHP license]] |
[[Category:Software using the PHP license]] |
||
[[Category: |
[[Category:Stack-based virtual machines]] |
||
[[Category:Bytecodes]] |
Latest revision as of 15:56, 6 November 2024
Developer(s) | Meta Platforms |
---|---|
Initial release | December 9, 2011[1] |
Stable release | 3.15.0[2]
/ 28 September 2016 |
Repository | |
Written in | PHP, C++,[3] OCaml[4][a] and Rust[5] |
License | PHP License and Zend License[6] |
Website | hhvm |
HipHop Virtual Machine (HHVM) is an open-source virtual machine based on just-in-time (JIT) compilation that serves as an execution engine for the Hack programming language. By using the principle of JIT compilation, Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into x86-64 machine code, optimized, and natively executed.[7][8] This contrasts with PHP's usual interpreted execution, in which the Zend Engine transforms PHP source code into opcodes that serve as a form of bytecode, and executes the opcodes directly on the Zend Engine's virtual CPU.[9]
HHVM is developed by Meta, with the project's source code hosted on GitHub;[10] it is licensed under the terms of the PHP License and Zend License.[1][6]
Overview
[edit]HHVM was created as the successor to the HipHop for PHP (HPHPc) PHP execution engine, which is a PHP-to-C++ transpiler also created by Facebook.[11][12] Based on the gained experience and aiming to solve issues introduced by HPHPc, Meta decided in early 2010 to create a JIT-based PHP virtual machine. Issues associated with HPHPc included reaching a plateau for further performance improvements, a fundamental inability to support all features of the PHP language, and difficulties arising from specific time- and resource-consuming development and deployment processes.[11] In Q1 2013, the production version of the facebook.com website stopped using HPHPc and switched to HHVM.
Following the JIT compilation principle, HHVM first converts the executed code into an intermediate language, the high-level bytecode HHBC. HHBC is a bytecode format created specifically for HHVM, appropriate for consumption by both interpreters and just-in-time compilers. Next, HHVM dynamically ("just-in-time") translates the HHBC into x86-64 machine code, optimized through dynamic analysis of the translated bytecode. Finally, it executes the x86-64 machine code.[1][11][13] As a result, HHVM has certain similarities to the virtual machines used by other programming languages, including the Common Language Runtime (CLR, for the C# language) and Java virtual machine (JVM, for the Java language).
HHVM brings many benefits in comparison with HPHPc. HHVM uses the same execution engine when deployed in both production and development environments, while supporting integration between the execution engine and the HPHPd debugger in both environment types; as a result, maintaining HPHPi (HipHop interpreter) separately as a development utility is no longer needed as it was the case with HPHPc. HHVM also eliminates the lengthy builds required by HPHPc to run programs, resulting in much simpler development and deployment processes than it was the case with HPHPc.[1] Finally, versions of HHVM before 4.0 have almost complete support for the entire PHP language (as defined by the official implementation of PHP version 5.4), including the support for the create_function()
and eval()
constructs, which was impossible with HPHPc.[14][15]
Together with HHVM 3.0,[16] Meta also released Hack, a derivative of PHP[17][18] that allows programmers to use both dynamic typing and static typing (a concept also known as gradual typing), and allows types to be specified for function arguments, function return values, and class properties. However, Hack does not provide complete backward compatibility since it removes several PHP features, such as the goto
statement and dynamic variable names.[19][20][21][22]
In September 2017, it was announced that version 3.30 would be the last version of HHVM to officially support PHP, and that HHVM will only support Hack going forward.[23] This was due to differences and incompatibilities in PHP 7.[24] HHVM 4.0, released in February 2019, was the first version without support for PHP.[25]
Performance
[edit]As a process virtual machine that provides the execution environment, HHVM has the ability to use live type information to produce more efficient native code, leading to a higher web server throughput and lower latency. In Q4 2012, the execution of facebook.com's source code on HHVM achieved performance parity with HPHPc,[11] and in December 2013 HPHPc was even surpassed by around 15%.[26]
See also
[edit]Notes
[edit]References
[edit]- ^ a b c d Jason Evans (December 9, 2011). "The HipHop Virtual Machine". Meta Platforms. Retrieved August 2, 2014.
- ^ "Release 3.15.0". September 28, 2016. Retrieved March 13, 2018.
- ^ "Building and installing HHVM on CentOS 7.x". github.com. Meta Platforms. May 26, 2015. Retrieved June 12, 2015.
- ^ "Building the Hack typechecker". github.com. Meta. September 10, 2014. Retrieved June 12, 2015.
- ^ "Facebook's HHVM Begins Seeing Rust Rewrite - Phoronix". Retrieved August 29, 2019.
- ^ a b "facebook/hhvm: License". github.com. Facebook, Inc. Retrieved August 2, 2014.
- ^ Ottoni, Guilherme (June 20, 2018). "HHVM JIT: A Profile-Guided, Region-Based Compiler for PHP and Hack". Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM. pp. 151–165.
- ^ "facebook/hhvm". github.com. Meta Platforms. Retrieved August 2, 2014.
- ^ Kaushik Pal (April 28, 2014). "PHP and Zend Engine Internals". phpbuilder.com. Archived from the original on September 15, 2014. Retrieved September 23, 2014.
- ^ HHVM source code on GitHub
- ^ a b c d Drew Paroski (November 29, 2012). "Speeding up PHP-based development with HHVM". Meta Platforms. Retrieved August 2, 2014.
- ^ "Announcement on GitHub removing HPHPc support". github.com. Meta Platforms. February 19, 2013. Retrieved May 24, 2013.
- ^ "HipHop Bytecode v1 revision 18". github.com. Meta Platforms. July 31, 2014. Retrieved May 24, 2013.
- ^ "facebook/hhvm: About upgrade to PHP 5.4 engine". github.com. May 2013. Retrieved August 2, 2014.
- ^ "facebook/hhvm: Home". github.com. Meta Platforms. May 8, 2014. Retrieved August 2, 2014.
- ^ Paul Tarjan (March 28, 2014). "HHVM 3.0.0". Facebook. Retrieved December 26, 2022.
- ^ Cade Metz (March 20, 2014). "Facebook Introduces 'Hack,' the Programming Language of the Future". Wired. Retrieved April 15, 2014.
- ^ Julien Verlaguet; Alok Menghrajani (April 2014). "Hack: a new programming language for HHVM". code.facebook.com. Facebook. Retrieved March 23, 2014.
- ^ Josh Lockhart (April 3, 2014). "Facebook's Hack, HHVM, and the future of PHP". O'Reilly Media. Retrieved August 2, 2014.
- ^ "Hack and HHVM: Type Annotations (Hack Manual)". docs.hhvm.com. Retrieved March 25, 2014.
- ^ "Hack and HHVM: Type Inference (Hack Manual)". docs.hhvm.com. Archived from the original on March 26, 2014. Retrieved March 25, 2014.
- ^ "Hack and HHVM: Unsupported PHP Features in Hack (Hack Manual)". docs.hhvm.com. Archived from the original on November 4, 2015. Retrieved April 2, 2014.
- ^ Fred Emmott (September 12, 2018). "Ending PHP Support, and The Future Of Hack". Retrieved December 26, 2022.
- ^ Krill, Paul (September 20, 2017). "Forget PHP! Facebook's HHVM engine switches to Hack instead". InfoWorld. Retrieved February 6, 2019.
- ^ Fred Emmott (February 11, 2019). "HHVM 4.0.0". Retrieved December 26, 2022.
- ^ "We are the 98.5% (and the 16%)". hhvm.com. December 19, 2013. Retrieved August 2, 2014.
External links
[edit]