RFC

PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
status = $status; } public function getStatus(): Status { return $this->status; } } PHP );?>
PHP 8.1
status = $status; } } PHP );?>

RFC

PHP < 8.1
PHP 8.1
foo(...); $fn = strlen(...); PHP );?>

RFC

PHP < 8.1
logger = $logger ?? new NullLogger(); } } PHP );?>
PHP 8.1
logger = $logger; } } PHP );?>
PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
PHP 8.1

RFC

PHP < 8.1
request('https://example.com/') ->then(function (Response $response) { return $response->getBody()->buffer(); }) ->then(function (string $responseBody) { print json_decode($responseBody)['code']; }); PHP );?>
PHP 8.1
request('https://example.com/'); print json_decode($response->getBody()->buffer())['code']; PHP );?>

RFC

PHP < 8.1
1]; $arrayB = ['b' => 2]; $result = array_merge(['a' => 0], $arrayA, $arrayB); // ['a' => 1, 'b' => 2] PHP );?>
PHP 8.1
1]; $arrayB = ['b' => 2]; $result = ['a' => 0, ...$arrayA, ...$arrayB]; // ['a' => 1, 'b' => 2] PHP );?>