Skip to content

Instantly share code, notes, and snippets.

@dantman
Created October 2, 2011 14:46
Show Gist options
  • Save dantman/1257510 to your computer and use it in GitHub Desktop.
Save dantman/1257510 to your computer and use it in GitHub Desktop.
PHP Strict standards: Declaration of AB::output() should be compatible with that of A::output() in /tmp/tmp.php on line 18
Strict standards: Declaration of AB::output() should be compatible with that of A::output() in /tmp/tmp.php on line 18
PHP Strict standards: Declaration of BA::output() should be compatible with that of B::output() in /tmp/tmp.php on line 25
Strict standards: Declaration of BA::output() should be compatible with that of B::output() in /tmp/tmp.php on line 25
PHP Strict standards: Declaration of CA::output() should be compatible with that of C::output() in /tmp/tmp.php on line 35
Strict standards: Declaration of CA::output() should be compatible with that of C::output() in /tmp/tmp.php on line 35
PHP Strict standards: Declaration of CB::output() should be compatible with that of C::output() in /tmp/tmp.php on line 38
Strict standards: Declaration of CB::output() should be compatible with that of C::output() in /tmp/tmp.php on line 38
<?php
class A {
function output() {}
}
class B {
function output( $par ) {}
}
class C {
function output( $par = null ) {}
}
class AA extends A {
function output() {}
}
class AB extends A {
function output( $par ) {}
}
class AC extends A {
function output( $par = null ) {}
}
class BA extends B {
function output() {}
}
class BB extends B {
function output( $par ) {}
}
class BC extends B {
function output( $par = null ) {}
}
class CA extends C {
function output() {}
}
class CB extends C {
function output( $par ) {}
}
class CC extends C {
function output( $par = null ) {}
}
foreach ( array( 'A', 'B', 'C' ) as $a ) {
foreach ( array( 'A', 'B', 'C' ) as $b ) {
$className = "$a$b";
$class = new $className();
$class->output( '' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment