rfc:typed_constants

Differences

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

Link to this comparison view

rfc:typed_constants [2023/01/25 09:13] – created kocsismaterfc:typed_constants [2023/01/25 20:24] (current) kocsismate
Line 162: Line 162:
 </code> </code>
  
-''getType()'' returns a ''ReflectionType'' if the class constant has a type, and null otherwise. +  * ''getType()'' returns a ''ReflectionType'' if the class constant has a type, and null otherwise. 
-''hasType()'' returns ''true'' if the class constant has a type, and false otherwise. The behavior matches that of ''getType()''/''hasType()'' for parameters/properties and ''getReturnType()''/''hasReturnType()'' for return types.+  ''hasType()'' returns ''true'' if the class constant has a type, and false otherwise. The behavior matches that of ''getType()''/''hasType()'' for parameters/properties and ''getReturnType()''/''hasReturnType()'' for return types.
  
 Additionally, a new ''ReflectionGlobalConstant'' class is added: Additionally, a new ''ReflectionGlobalConstant'' class is added:
  
 +<code php>
 class ReflectionConstant implements Reflector { class ReflectionConstant implements Reflector {
     public string $name;     public string $name;
Line 199: Line 200:
  
 Both votes require 2/3 majority. Both votes require 2/3 majority.
 +
 +==== Vote #1 ====
  
 <doodle title="Add support for typed class constants?" auth="kocsismate" voteType="single" closed="true"> <doodle title="Add support for typed class constants?" auth="kocsismate" voteType="single" closed="true">
Line 205: Line 208:
 </doodle> </doodle>
  
 +==== Vote #2 ====
  
 <doodle title="Add support for typed global constants?" auth="kocsismate" voteType="single" closed="true"> <doodle title="Add support for typed global constants?" auth="kocsismate" voteType="single" closed="true">
rfc/typed_constants.1674637984.txt.gz · Last modified: 2023/01/25 09:13 by kocsismate