# Summary of some of the new changes:
## Union types
Specify multiple types
public function foo(Foo|Bar $input): int|float;
## JITJust in time compiler for improved performance
## Static return type
Return static of class
class Foo
{
public function test(): static
{
return new static();
}
}
## Weak mapsPrevent blocking of garbage collection for improved memory usage when needed
private WeakMap $cache;
## ::class on objectsGet class type from object like get_class($object)
$foo = new Foo();
var_dump($foo::class);
## fdiv functionWhen you don't care about division by zero
fdiv($x,0);
## Concatenation precedenceMath takes precedence in string concatenation.
// this
echo "sum: " . $a + $b;
// evaluated as this
echo "sum: " . ($a + $b);
## Some others- Create DateTime objects from interface
- Type annotations for internal functions
- Variable syntax tweaks
- Breaking changes
- Consistent type errors
- Reclassified engine warnings
- Reflection method signature changes
* Note: HN pretty please get improved mark down parsing