rfc:callable-interfaces

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:callable-interfaces [2016/04/06 12:00]
ocramius
rfc:callable-interfaces [2017/09/22 13:28] (current)
Line 4: Line 4:
   * Author: Ben Scholzen, mail@dasprids.de   * Author: Ben Scholzen, mail@dasprids.de
   * Author: Marco Pivetta, ocramius@gmail.com   * Author: Marco Pivetta, ocramius@gmail.com
-  * Status: ​Draft+  * Status: ​Retired
   * First Published at: http://​wiki.php.net/​rfc/​callable-interfaces   * First Published at: http://​wiki.php.net/​rfc/​callable-interfaces
  
Line 129: Line 129:
 var_dump($register instanceof DeleteUserRegistration);​ // true? false? possibly want to keep current semantics here. var_dump($register instanceof DeleteUserRegistration);​ // true? false? possibly want to keep current semantics here.
 </​code>​ </​code>​
 +
 +===== Retired =====
 +
 +This RFC has been retired. Reason for that is that PHP currently (Version 7.0~7.1) allows applying function semantics to objects via the **_****_invoke** magic methods. Allowing the opposite would mix the domain of functions and objects in ways that are very hard to disentangle,​ and it would needlessly complicate the language semantics.
 +
 +While it is unfortunate that migration to type-safe callables (https://​wiki.php.net/​rfc/​typesafe-callable) would require some interface rewrites, that is indeed the correct solution, as it keeps the uni-directionality between object and function semantics.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/callable-interfaces.txt · Last modified: 2017/09/22 13:28 (external edit)