HHVM 4.100 is released! This release marks the end of support for 4.94; HHVM 4.95–4.99 remain supported, as do the 4.56 and 4.80 LTS releases.
- The typechecker now takes advantage of the guarantee that
switchstatements are exhaustive (this has been enforced at runtime since HHVM 4.80), i.e. that at least one branch of the
switchstatement is guaranteed to be executed (or an exception is thrown).
- This allows the typechecker to e.g. correctly infer the type of any variable
that is set in all branches of the
switchstatement, allowing some previously rejected programs to pass.
- This allows the typechecker to e.g. correctly infer the type of any variable that is set in all branches of the
- The built-in attribute
<<__Pure>>and all related attributes (
__ReturnsVoidToRx) were removed. They have been replaced by contexts and capabilities.
- The typechecker now raises an error if the
asoperators are used with the type
$x is nothing,
$x as nothing).
- In the future, using any of the
with values of incompatible types will cause an exception to be thrown at
runtime (all of these cases already raise typechecker errors). Affected
^: both operands must be
~(unary): operand must not be
>>: both operands must be
- Same rules apply to the respective assignment operators (
- The INI option
hhvm.notice_on_coerce_for_bit_op=2can be used to enable the future behavior now (set to
1to raise a notice instead of throwing an exception).