HHVM 4.17.0
HHVM 4.17 is released! This release marks the end of support for 4.11; 4.12-4.16 remain supported, as do the LTS releases 3.30 and 4.8.
Highlights
Reified generics are now supported. See full documentation and migration guide.
1
2
3
4
function foo<reify T>(T $arg): void { ... }
foo<int>(42);
foo<string>(42); // now a runtime error
Reified generic types can be used in the function code:
1
2
3
4
5
6
7
8
9
10
11
12
13
abstract class BaseClass {
abstract public function foo(): void;
}
// Before:
function bar(classname<BaseClass> $classname): void {
$classname::foo();
}
// After:
function bar<reify T as BaseClass>(): void {
T::foo();
}
Also see how to
test and assert
reified generic types and how to
create new
instances
of reified generic classes.