1// php8 class and construct
2class Point {
3 public function __construct(
4 public float $x = 0.0,
5 public float $y = 0.0,
6 public float $z = 0.0,
7 ) {}
8}
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
1// php8 is null or not
2$country = $session?->user?->getAddress()?->country;
3
4//-----------------------------
5// php7 below.
6$country = null;
7
8if ($session !== null) {
9 $user = $session->user;
10
11 if ($user !== null) {
12 $address = $user->getAddress();
13
14 if ($address !== null) {
15 $country = $address->country;
16 }
17 }
18}
19
20