Repository navigation
Conversation
Contributor
|
YES, PLEASE! :) |
Member
|
This needs an RFC. Also think about the following: error_reporting(E_STRICT);
Class X
{
function cleanup($recurse, $unlink=False) {
}
}
class Z extends X
{
function cleanup($unlink) {
}
}
$x = getInstanceOfX(); // returns Z
$x->cleanup(true); // woops..suddenly everything gone |
|
From a userland perspective: class Parents
{
public function doSomething($x)
{
}
}
class ChildA extends Parents
{
public function doSomething()
{
}
}
// Strict Standards: Declaration of ChildC::doSomething() should be compatible with that of Parents::doSomething()
class ChildB extends Parents
{
public function doSomething($x, $y)
{
}
}
// Strict Standards: Declaration of ChildB::doSomething() should be compatible with that of Parents::doSomething()
class ChildC extends Parents
{
public function doSomething($x)
{
}
}
// WorksNo matter if ChildA, ChildB oder ChildC, doSomething() should always be callable with one argument. Another thing, see the following code: interface BazInterface
{
public function doSomething($x);
}
class BazA implements BazInterface
{
public function doSomething()
{
}
}
// Fatal error: Declaration of BazA::doSomething() must be compatible with that of BazInterface::doSomething()
class BazB implements BazInterface
{
public function doSomething($x, $y)
{
}
}
// Fatal error: Declaration of BazB::doSomething() must be compatible with that of BazInterface::doSomething()Will this affect interfaces, too? |
Member
Author
|
In light of a possible addition of named parameters in the future it's likely better not to allow this. Withdrawing this proposal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch for http://markmail.org/message/ejgmqjnjnbmfnuzv.