rfc:scalar_type_hinting_with_cast
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:scalar_type_hinting_with_cast [2014/07/25 19:00] – Fix booleans section of table ajf | rfc:scalar_type_hinting_with_cast [2017/09/22 13:28] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Request for Comments: Scalar Type Hinting With Casts ====== | ====== Request for Comments: Scalar Type Hinting With Casts ====== | ||
- | * Version: 0.1.9 | + | * Version: 0.1.9.1 |
- | * Date: 2012-07-03 (reopened 2014-07-13, latest update 2014-07-20) | + | * Date: 2012-07-03 (reopened 2014-07-13, latest update 2014-09-14, withdrawn 2014-09-15) |
* Author: Anthony Ferrara < | * Author: Anthony Ferrara < | ||
* Contributors: | * Contributors: | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 41: | Line 41: | ||
* //int// - Matching integers only | * //int// - Matching integers only | ||
* //float// - Matching floating point numbers | * //float// - Matching floating point numbers | ||
- | * //numeric// - Mathing | + | * //numeric// - Matching |
* //bool// - Matching boolean parameters only | * //bool// - Matching boolean parameters only | ||
* //string// - Matching strings only | * //string// - Matching strings only | ||
Line 125: | Line 125: | ||
==== Patch ==== | ==== Patch ==== | ||
- | The modifications necessary to implement this feature exist on the [[https:// | + | The modifications necessary to implement this feature exist on the [[https:// |
===== Possible Changes ===== | ===== Possible Changes ===== | ||
+ | |||
+ | For points I'm unsure on, this section lists possible future changes to the RFC. | ||
==== Float to Int Casting Rules ==== | ==== Float to Int Casting Rules ==== | ||
Line 178: | Line 180: | ||
foo(" | foo(" | ||
foo(" | foo(" | ||
+ | foo("" | ||
foo(999999999999999999999999999999999999); | foo(999999999999999999999999999999999999); | ||
foo(' | foo(' | ||
Line 198: | Line 201: | ||
foo(" | foo(" | ||
foo(" | foo(" | ||
+ | foo("" | ||
foo(1.5); // float(1.5) | foo(1.5); // float(1.5) | ||
foo(array()); | foo(array()); | ||
Line 216: | Line 220: | ||
foo(" | foo(" | ||
foo(" | foo(" | ||
+ | foo("" | ||
foo(1.5); // float(1.5) | foo(1.5); // float(1.5) | ||
foo(array()); | foo(array()); | ||
Line 234: | Line 239: | ||
foo(" | foo(" | ||
foo(" | foo(" | ||
+ | foo("" | ||
foo(1.5); // string " | foo(1.5); // string " | ||
foo(array()); | foo(array()); | ||
Line 254: | Line 260: | ||
foo(" | foo(" | ||
foo(" | foo(" | ||
+ | foo("" | ||
foo(1.5); // E_RECOVERABLE_ERROR | foo(1.5); // E_RECOVERABLE_ERROR | ||
foo(array()); | foo(array()); | ||
Line 262: | Line 269: | ||
?> | ?> | ||
</ | </ | ||
+ | |||
+ | ===== Proposed Voting Choices ===== | ||
+ | |||
+ | As this is a language change, a 2/3 majority is required. Voting started 2014-09-14 and ends 2014-09-21. | ||
+ | |||
+ | It will be a straight Yes/No vote. | ||
===== More Information ===== | ===== More Information ===== | ||
Line 285: | Line 298: | ||
* 0.1.8.1 - Overflow prevention for int hints | * 0.1.8.1 - Overflow prevention for int hints | ||
* 0.1.9 - Booleans not accepted for int, float, numeric or string | * 0.1.9 - Booleans not accepted for int, float, numeric or string | ||
+ | * 0.1.9.1 - Added "" |
rfc/scalar_type_hinting_with_cast.txt · Last modified: 2021/09/09 06:07 by heiglandreas