rfc:prototype_checks

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:prototype_checks [2011/09/19 11:51] – [Mismatch but theoretically compatible] colderrfc:prototype_checks [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Request for Comments: How to write RFCs ======+====== Request for Comments: Prototype checks ======
   * Version: 1.0   * Version: 1.0
   * Date: 2011-09-19   * Date: 2011-09-19
   * Author: Etienne Kneuss <colder@php.net>   * Author: Etienne Kneuss <colder@php.net>
-  * Status: Under Discussion+  * Status: Inactive
   * First Published at: http://wiki.php.net/rfc/prototype_checks   * First Published at: http://wiki.php.net/rfc/prototype_checks
  
Line 142: Line 142:
 Constructors can be seen as pseudo-static methods, for this reason, the same checks for normal methods do not always apply for constructors. Constructors can be seen as pseudo-static methods, for this reason, the same checks for normal methods do not always apply for constructors.
  
-It is however unclear whether we really want, for constructors, to be more strict if they are defined via an abstract class. So:+It is however unclear whether we really want, for constructors, to be more strict (and how strict) if they are defined via an abstract class. So:
  
-  - Do we really want that check to be performed on 5.4 for constructors in abstract methods+  - Do we really want that check to be performed on 5.4 for constructors coming from abstract methods
   - Do we really want the mismatch to result in a FATAL error (potential BC break coming from 5.3 where no checks were done)   - Do we really want the mismatch to result in a FATAL error (potential BC break coming from 5.3 where no checks were done)
  
  
 +==== Similar prototypes from different interfaces ====
 +It would be better to allow multiple interfaces to define the same intersection of prototype. It is currently not allowed in any case.
  
 +For example:
 +
 +  interface A {
 +    function apply($a, $b);
 +    // ...
 +  }
 +  
 +  interface B {
 +     function apply($a, $b);
 +     // ...
 +  }
 +  
 +  class C implements A, B { .. }
 +
 +This is currently not allowed, but there is no reason why it shouldn't be.
rfc/prototype_checks.1316433100.txt.gz · Last modified: 2017/09/22 13:28 (external edit)