rfc:additional_soft_reservations_for_php7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:additional_soft_reservations_for_php7 [2015/07/03 21:50]
nikic make text clearer
rfc:additional_soft_reservations_for_php7 [2017/09/22 13:28] (current)
Line 17: Line 17:
 ==== void ==== ==== void ====
  
-**Where**: As a class, interface or trait name.+**Where**: As the last segment of a class, interface or trait name. As such the names ''​Void''​ and ''​Foo\Bar\Void''​ are reserved, while ''​Foo\Bar\MyVoid''​ and ''​Void\Foo\Bar''​ are okay.
  
 **Why**: ''​void''​ is a likely candidate for the demarcation of void functions (which do not return a value). Alternatively ''​null''​ can be used for this purpose, which is already reserved. However both possibilities should be kept open until we reach a decision on this question. **Why**: ''​void''​ is a likely candidate for the demarcation of void functions (which do not return a value). Alternatively ''​null''​ can be used for this purpose, which is already reserved. However both possibilities should be kept open until we reach a decision on this question.
Line 23: Line 23:
 ==== enum ==== ==== enum ====
  
-**Where**: In any context which is not protected by the [[https://​wiki.php.net/​rfc/​context_sensitive_lexer|context sensitivity RFC]]. This includes class, interface and trait names, but also global ​function ​and constant ​names etc.+**Where**: In any context which is not protected by the [[https://​wiki.php.net/​rfc/​context_sensitive_lexer|context sensitivity RFC]]. This includes ​any segment of class, interface, trait and function names.
  
 **Why**: There already is an [[https://​wiki.php.net/​rfc/​enum|enum RFC]] which will be proposed for PHP 7.x and requires this reserved keyword. **Why**: There already is an [[https://​wiki.php.net/​rfc/​enum|enum RFC]] which will be proposed for PHP 7.x and requires this reserved keyword.
rfc/additional_soft_reservations_for_php7.1435960230.txt.gz · Last modified: 2017/09/22 13:28 (external edit)