rfc:additional_soft_reservations_for_php7

Differences

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

Link to this comparison view

Next revision
Previous revision
rfc:additional_soft_reservations_for_php7 [2015/07/03 16:18]
nikic created
rfc:additional_soft_reservations_for_php7 [2017/09/22 13:28] (current)
Line 12: Line 12:
  
 ===== Reservations ===== ===== Reservations =====
 +
 +All reservations are case-insensitive.
  
 ==== void ==== ==== void ====
  
-The ''​void''​ name (in any combination ​of case) should be reserved in class, interface ​and trait name contextsbecause this 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.+**Where**: As the last segment ​of class, interface ​or trait name. As such the names ''​Void''​ and ''​Foo\Bar\Void''​ are reservedwhile ''​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.
  
 ==== enum ==== ==== enum ====
  
-The ''​enum''​ name (in any combination of case) should be reserved in all contexts that are not protected by the [[https://​wiki.php.net/​rfc/​context_sensitive_lexer|context sensitivity RFC]]. 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.+**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.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/additional_soft_reservations_for_php7.1435940330.txt.gz · Last modified: 2017/09/22 13:28 (external edit)