Andi Gutmans wrote:
b) By default, don't check signature for inheritance *if* we're not inheriting from an abstract class. If it is an abstract class we should check the signature because it's a PHP 5 feature.

Do you mean :


- check the signature only for methods which were in the abstract class (I hope it is this solution)
or
- check the signature for all methods if a class is inheriting from an abstract (assuming that if it uses an abstract somewhere then we are not in compatibility and we can use the strict checks for all the class methods except constructor)



Exemple of what I mean is below :


abstract class myAbstract {
    public function fromAbstract() ;
}
interface myInterface {
   public function fromInterface() ;
}

class myClass extends myAbstract implements myInterface {
   public function fromAbstract() {
     // ... ** If I understand correctly we check signature for this one
   }
   public function fromInterface() {
     // ... ** If I understand correctly we check signature for this one
   }
   public function otherMethod() {
     // ...
   }
}

class myInheritedCLass extends myClass {
  public function otherMethod() {
    // ... ** Do web check signature of this one ?
  }
  public function fromAbstract() {
   // ... ** If I understand correctly we check signature for this one
  }
  public function fromInterface() {
     // ... ** If I understand correctly we check signature for this one
  }
}

> c) Add a new INI option (zend.strict_inheritance_checks)

Will it be possible to override it at runtime with ini_set() ? (even if it will not be necessary if it is disable per default)

--
Eric

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to