rfc:new_without_parentheses
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:new_without_parentheses [2024/05/09 15:01] – Add voting vudaltsov | rfc:new_without_parentheses [2024/05/28 18:04] (current) – Added Target Version vudaltsov | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2023-12-29 | * Date: 2023-12-29 | ||
* Author: Valentin Udaltsov (udaltsov.valentin@gmail.com) | * Author: Valentin Udaltsov (udaltsov.valentin@gmail.com) | ||
- | * Status: | + | * Status: |
+ | * Target Version: PHP 8.4 | ||
* Discussion: https:// | * Discussion: https:// | ||
* First Published at: http:// | * First Published at: http:// | ||
- | * Implementation | + | * Implementation: |
===== Introduction ===== | ===== Introduction ===== | ||
Line 38: | Line 39: | ||
<code php> | <code php> | ||
- | class MyClass | + | class MyClass |
{ | { | ||
const CONSTANT = ' | const CONSTANT = ' | ||
Line 59: | Line 60: | ||
new MyClass()-> | new MyClass()-> | ||
new MyClass()(), | new MyClass()(), | ||
+ | new MyClass([' | ||
); | ); | ||
Line 69: | Line 71: | ||
new $myClass()-> | new $myClass()-> | ||
new $myClass()(), | new $myClass()(), | ||
+ | new $myClass([' | ||
); | ); | ||
Line 78: | Line 81: | ||
new (trim(' | new (trim(' | ||
new (trim(' | new (trim(' | ||
+ | new (trim(' | ||
); | ); | ||
</ | </ | ||
Line 89: | Line 93: | ||
new $myClass:: | new $myClass:: | ||
new $myObject-> | new $myObject-> | ||
+ | new MyArrayConst[' | ||
+ | new $myArray[' | ||
</ | </ | ||
Line 108: | Line 114: | ||
// string(8) " | // string(8) " | ||
new class { public function __invoke() { return ' | new class { public function __invoke() { return ' | ||
+ | // string(5) " | ||
+ | new class ([' | ||
); | ); | ||
</ | </ | ||
Line 187: | Line 195: | ||
Voting started on 2024-05-09 and will end on 2024-05-24 00:00 GMT. | Voting started on 2024-05-09 and will end on 2024-05-24 00:00 GMT. | ||
- | <doodle title=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No | ||
Line 194: | Line 202: | ||
===== Implementation ===== | ===== Implementation ===== | ||
- | https:// | + | Pull request contains the final implementation and plenty of tests asserting the expected behavior and backward compatibility: |
===== References ===== | ===== References ===== |
rfc/new_without_parentheses.1715266878.txt.gz · Last modified: 2024/05/09 15:01 by vudaltsov