rfc:nullable-casting

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:nullable-casting [2019/03/26 07:51] – reorder, reword guilliamxavierrfc:nullable-casting [2019/04/06 07:45] – Change Status to Under Discussion guilliamxavier
Line 4: Line 4:
   * Date: 2019-03-17   * Date: 2019-03-17
   * Author: David Rodrigues (david.proweb@gmail.com), Guilliam Xavier (guilliam.xavier@gmail.com)   * Author: David Rodrigues (david.proweb@gmail.com), Guilliam Xavier (guilliam.xavier@gmail.com)
-  * Status: Draft+  * Status: Under Discussion
   * First Published at: http://wiki.php.net/rfc/nullable-casting   * First Published at: http://wiki.php.net/rfc/nullable-casting
  
Line 15: Line 15:
 ===== Motivating Example ===== ===== Motivating Example =====
  
-In strict type-checking mode (<php><?php declare(strict_types=1);</php>), given two functions like the following:+In strict type-checking mode (<php><?php declare(strict_types=1);</php>), given two functions like the following (disclaimer: dummy implementation):
  
 <PHP> <PHP>
Line 167: Line 167:
  
   * **Accept nullable casting?**: Simple vote (Yes / No), requiring a 2/3 majority to pass.   * **Accept nullable casting?**: Simple vote (Yes / No), requiring a 2/3 majority to pass.
-    * **Additionally accept nullable settype()?**: Simple vote (Yes / No), requiring a 2/3 majority to pass.+    * **Additionally accept nullable settype()?**: Simple vote (Yes / No), also requiring a 2/3 majority to pass.
       * **How to handle settype($x, "?null")?**: Multi-options vote (Allow silently / Allow but Notice / Disallow with specific Warning / Disallow with the generic Warning), the option with more votes will win.       * **How to handle settype($x, "?null")?**: Multi-options vote (Allow silently / Allow but Notice / Disallow with specific Warning / Disallow with the generic Warning), the option with more votes will win.
 +
 +(The voting period would be two weeks)
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 176: Line 178:
 ===== References ===== ===== References =====
  
-  * [[http://php.net/manual/en/language.types.type-juggling.php|PHP Manual: Type Juggling]] +  * PHP Manual: [[http://php.net/manual/en/language.types.type-juggling.php|Type Juggling]][[http://php.net/manual/en/function.settype.php|settype() function]] 
-  * [[http://php.net/manual/en/function.settype.php|PHP Manual: settype() function]] +  * PHP RFC: [[rfc:scalar_type_hints_v5|Scalar Type Declarations]][[rfc:nullable_types|Nullable Types]]
-  * [[rfc:scalar_type_hints_v5|PHP RFC: Scalar Type Declarations]] +
-  * [[rfc:nullable_types|PHP RFC: Nullable Types]]+
   * Initial idea and discussion: https://externals.io/message/102997   * Initial idea and discussion: https://externals.io/message/102997
rfc/nullable-casting.txt · Last modified: 2019/04/21 09:03 by guilliamxavier