1// php 8 Union type
2class Number {
3 public function __construct(
4 private int|float $number
5 ) {}
6}
7
8new Number('NaN'); // TypeError
9
10
1pub 4096R/70D12172 2017-04-14 [expires: 2024-04-21]
2 Key fingerprint = 1729 F839 38DA 44E2 7BA0 F4D3 DBDB 3974 70D1 2172
3uid Sara Golemon <pollita@php.net>
4
5pub rsa4096 2020-05-09 [SC] [expires: 2024-05-08]
6 BFDD D286 4282 4F81 18EF 7790 9B67 A5C1 2229 118F
7uid [ultimate] Gabriel Caruso (Release Manager) <carusogabriel@php.net>
8sub rsa4096 2020-05-09 [E] [expires: 2024-05-08]
9