Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Düsterhus <[email protected]>
  • Loading branch information
saundefined and TimWolla authored Nov 18, 2023
1 parent 9dc7e56 commit e5d2c38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions releases/8.3/languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
'main_subtitle' => 'PHP 8.3 is a major update of the PHP language.<br class="display-none-md">It contains many new features, including Readonly amendments, Typed class constants, Randomizer additions, performance improvements and more.',
'upgrade_now' => 'Upgrade to PHP 8.3 now!',

'readonly_title' => 'Readonly amendments',
'readonly_title' => 'Deep-cloning of readonly properties',
'readonly_description' => '<code>readonly</code> properties may now be modified once within the magic <code>__clone</code> method to enable deep-cloning of readonly properties.',
'json_validate_title' => 'New <code>json_validate()</code> function',
'json_validate_description' => '<code>json_validate()</code> allows to check if a string is syntactically valid JSON, while being more efficient than <code>json_decode()</code>.',
'typed_class_constants_title' => 'Typed class constants',
'override_title' => '<code>#[\Override]</code> attribute',
'override_title' => 'New <code>#[\Override]</code> attribute',
'override_description' => 'By adding the <code>#[\Override]</code> attribute to a method, PHP will ensure that a method with the same name exists in a parent class or in an implemented interface. Adding the attribute makes it clear that overriding a parent method is intentional and simplifies refactoring, because the removal of an overridden parent method will be detected.',
'randomizer_getbytesfromstring_title' => 'New <code>Randomizer<span style="word-break: break-all;">::</span>getBytesFromString()</code> method',
'randomizer_getbytesfromstring_description' => 'The <a href="/releases/8.2/en.php#random_extension">Random Extension</a> that was added in PHP 8.2 was extended by a new method to generate random strings consisting of specific bytes only. This method allows to easily generate random identifiers, such as domain names, and numeric strings of arbitrary length.',
Expand Down
8 changes: 5 additions & 3 deletions releases/8.3/release.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ common_header(message('common_header', $lang));
<?php highlight_php_trimmed(
<<<'PHP'
interface I {
// We may naively assume that the PHP constant is always a string
// We may naively assume that the PHP constant is always a string.
const PHP = 'PHP 8.2';
}
class Foo implements I {
const PHP = []; // But it may be an array...
// But implementing classes may define it as an array.
const PHP = [];
}
PHP

Expand All @@ -75,7 +76,8 @@ class Foo implements I {
const string PHP = [];
}
// Fatal error: Cannot use array as value for class constant Foo::PHP of type string
// Fatal error: Cannot use array as value for class constant
// Foo::PHP of type string
PHP
); ?>
</div>
Expand Down

0 comments on commit e5d2c38

Please sign in to comment.