HHVM 2.4.0
It is that wonderful time again for an HHVM release. We’re sticking to our 8 week release cadence to keep everything fresh and in your hands. Also, remember you can run the nightly packages if you want a bleeding edge feature.
Install:
This release has many exciting points. First of all, 4 more large frameworks now pass 100% of their unit tests (using phpunit 3.9) - Laravel, Mockery, PHPUnit and CodeIgniter. Remember to put HHVM in your travis config and we just might do a drive-by and make them all pass.
Big fixes:
-
A full rewrite of the ini parser
-
Support for the same recursive
__get()
and__set()
semantics as php-src -
Implemented
try {} finally {}
-
Various reflection bugs
-
Turned on the Region JIT, which makes the blocks of code that we translate larger giving more opportunity for speedups
You might notice our new naming scheme for our 2 week releases. Since we are the HipHop team, we thought it would be fitting to use hiphop themed names. If you have suggestions for release names feel free to comment. Also, we noticed that there are 52 weeks in the year and with a release every 2 weeks, we can name them alphabetically and just perfectly fit. So far we’ve had Appleseed, Beastie Boys and Coolio.
Security Fixes:
CVE-2014-1439: Fix libxml_disable_entity_loader(). This was also part of the 2.3.3 release.
Full Changelog:
-
Turn on Region JIT
-
FastCGI fixes, perf improvements
-
ext_zend_compat
fixes -
Turn on XLS Register Allocator by default
-
Fix server stats reporting
-
‘
num
’ scalar typehint that accepts both ints and floats -
fix support for typedef’d namespaces
-
don’t swallow fatals when autoloading
-
Map collections learned the in-place
retain()
andretainWithKey()
-
rename
Set::difference()
toSet::removeAll()
-
Update
Set
to retain element insertion order -
remove APC stats
-
Fixes for ARM mode
-
FrozenMap
collection -
Deprecated
Vector|Set|Map::put()
method removed -
==
betweenFrozen{Vector|Set|Map}
and{Vector|Set|Map}
now can return true -
Support lex-time binary constants (eg.
0b10111
) -
StreamWrappers
now supportrmdir
,mkdir
,rename
andunlink
-
Miscellaneous Zend PHP compatibility fixes
-
Default
StatCache
to off -
Miscellaneous FastCGI fixes
-
Miscellaneous region compiler fixes
-
Map
andStableMap
collections use the same underlying implementation -
Trait requirements enforced
-
hhprof performance improvements
-
Add array to string conversion notice
-
Add
RaiseNotice
IR opcode -
Fix VirtualHost.
.Pattern matching -
Fix various memory leaks (
pdo_parse_params
,Gen*WaitHandle
) -
Import a lot more Zend tests that used to crash or hang
-
Clean up
base.h
-
XLS register allocation cleanup
-
Enable region compiler by default for JIT functions in ahot
-
Fatal on
eval()
in RepoAuthoritative mode -
Enable Link Time Optimization (LTO) for HHVM
-
Fix a few SPL compatibility issues
-
Fix issues with
DOCUMENT_ROOT
in fastcgi -
Better type inference for collections and builtins in repo mode
-
Shorter syntax for lambda expressions w/ automatic captures
-
Parser support for trait require clauses
-
Move
FrozenVector
andSet
to the HH namespace -
Fix resource to array conversion
-
Fix a request local memory leak in foreach of apc arrays
-
Initial
php_odbc
API implementation -
Implement PHP’s
hash_copy()
function -
Experimental tool: Memoization Opportunity Profiler
-
Various small parity/behavior fixes (in
phar
,proc_open
,filter_var
) -
A
Eval.DumpHhas=1
option to dump hhas for a php file -
Better warnings in
Set::toArray
-
Fix the behavior of foreach loops in finally blocks
-
chmod -x runtime/vm/jit/*.{cpp,h}
-
Changes to make hhvm build clean with clang-3.4
-
Fix
array_product
to not be bug-compatible with PHP 5.2 -
Change the
Map
datastructure—preserves order and does faster foreach -
FrozenSet
collection -
Generate pid.map when we unmap text section, for the perf tool
-
Implemented
GlobIterator
-
Implemented
Reflection::export
andReflection::getModifierNames
-
support
date.timezone
in ini files -
implement
fileinfo
-
special comparisons for
DateTime
-
delete unimplemented functions
-
support for the finally clause in try blocks
Comments
- Luis Lobo Borobia: Great news! Do you have a live document that shows framework compatibility? If not, it would be great to have a link somewhere here, showing how each framework is doing during each release.
- SoboLAN: I just installed it today and was wondering why I got the 2.4 version as, from what I knew, the latest version is 2.3. It's nice when things work out :) . Awesome job, guys, as always.
- Paul Tarjan: Great question. We are writing that as you speak. Stay tuned.
- Luis Morales: Coincidentally I installed a fresh hhvm today around 6:00 ET, just in time to get the new version. So, technically I got hhvm 2.4 before the rest of the world knew about it. Booyah!
- Markus: Any benchmark of this new release?
- Makara Sok: Nice! Doing my tests as we speak :). Next release: Dr. Dre?
- Paul Tarjan: Good question. We didn't really focus on performance this release since it included the holidays and many people were out of the office. I know each internal release was in the single digit %s so I wouldn't expect anything too large. If others want to measure, that would be useful.
- Dave Hulbert: "Shorter syntax for lambda expressions w/ automatic captures" sounds interesting. Are there any docs on it?
- Paul Tarjan: Stay tuned
- wwbmmm: Good job! In which release will mysqli be available?
- Paul Tarjan: 2.5.0
- Pierre: Works great!! Since 2.4 our Piwik Solution works like a charm. The combination of Nginx + FastCGI + HHVM 2.4 is overwhelming. From 2.4s per request down to 142ms with hhvm <3
- Serj: Do you plan to support Ruby and Python syntax enough to run Rails and Django ?
- Paul Tarjan: lol... not for a long while...
- Christopher Svanefalk: Does this mean we might be seeing compatibility between Moodle and HHVM as of 2.5.0? From what I have heard there is at least some interest within the Moodle community for reaching HHVM compliance, with the lack of mysqli being the chief show stopper. We have deployed Moodle for one of our educational clients. It is a beast of a PHP app (both in terms of size and runtime complexity), and it would be interesting to see how well it runs under HHVM.
- Emanuele Cesena: Congrats! Recursive __get() fix is a great plus... Theneeds.com is joining the party... https://twitter.com/ecesenat/status/430558113620451328
- Jan Gantzert: If I have some time, I think I will do that. I have some Numbers on 2.32. http://www.jg-dev.de/hhvm-performance-apache-bench
- Rocco Zanni: Any plans for having an officially supported PDO postgresql extension?
- Paul Tarjan: Yes, but it pretty low on our roadmap. If the external one reached zend parity, we would happily pull it into master.
- brian: One of the most critical aspects of a deployment is diagnostics. Are you guys going to put hooks in your code so companies like New Relic can hook in
- Javier: I recently installed nginx and hhvm-fastcgi and after a few tries I maked work properly my yii framework app, but is too slow compared with LAMP, maybe I missing something, plz help me.
- Jan Gantzert: Hi, I have some numbers for a WP Blog with 2.3.2 and 2.4.0. It seems, that the new version it faster than the old one. http://www.jg-dev.de/hhvm-performance-2-32-vs-2-40 Greetings Jan
- Shivaas: Doesn't this solve your purpose: http://blog.newrelic.com/2014/02/10/agentsdk-blog-post/ ?
- Shivaas: Is your Ngingx configured properly? I would suggest taking a look at optimizing the Nginx config, as well as seeing if your hosting infrastructure is limiting performance.
- Rob: I've been using hhvm for my site for over 6 months and have never looked back. The best stack has to be nginx with spdy enabled, fastcgi and hhvm. I rarely see CPU usage rise over 2% even during busy periods. You guys who are working on hhvm have created a true work of art. The only thing that I feel is missing is support for Unix sockets over fastcgi... Do you guys plan on implementing this any time soon?
- sgolemon: Coming in 2.5.0: https://github.com/facebook/hhvm/commit/b538a34e8929fdc7ca8bd7d24da513327fd53a06
- Rob: Excellent news, thanks very much
- sanghee: hhvm on centOS 6.5 What is the latest package?
- HHVM 2.4.0 – auf dem Weg zu 100 Prozent - entwickler.de: […] Eine vollständige Liste aller Updates findet man in der offiziellen Ankündigung. […]