rfc:callable-types
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:callable-types [2016/05/23 14:03] – nikita2206 | rfc:callable-types [2016/05/24 05:57] – param default values nikita2206 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Callable | + | ====== PHP RFC: Callable |
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2015-08-27 | * Date: 2015-08-27 | ||
* Authors: Nikita Nefedov < | * Authors: Nikita Nefedov < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 195: | Line 195: | ||
</ | </ | ||
- | Optional parameters count just like any other arguments | + | Optional parameters count just like any other parameters |
<code php> | <code php> | ||
function foo(callable() $cb) { } | function foo(callable() $cb) { } | ||
Line 240: | Line 240: | ||
There' | There' | ||
+ | |||
+ | ==== Parameters with default values ==== | ||
+ | |||
+ | It's not possible to declare default value of a parameter in a callable prototype. Because currently PHP doesn' | ||
==== Syntax Choices ==== | ==== Syntax Choices ==== | ||
Line 462: | Line 466: | ||
Besides that, even with named callable types support, inlined callable types could be a way to keep the type unexposed from public API | Besides that, even with named callable types support, inlined callable types could be a way to keep the type unexposed from public API | ||
while PHP lacks first class packages. | while PHP lacks first class packages. | ||
- | |||
- | ==== Reflection API ==== | ||
- | |||
- | An extension to the reflection API will be proposed in case the RFC is approved. | ||
===== Votes ===== | ===== Votes ===== | ||
This RFC requires a 2/3 majority to pass. | This RFC requires a 2/3 majority to pass. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/callable-types.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1