lse123
March 28th, 2011, 05:13 AM
Why get warnings?
Strict Standards: Declaration of circle::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\circle.php on line 4
Strict Standards: Declaration of square::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\square.php on line 17
I receive such messages when run
function resize($intSize) { // this on circle or square class
parent::resize($intSize, $intSize);
}
where parent::resize on shape class ... when run a function from square (or circle) extends rectangle (or ellipse) both extend shape,... in other words when in a class[eg square] function (class extends indirectly)...eg shape class. I get these warnings when extend directly [eg rectangle], these no appear...well how fix?
Strict Standards: Declaration of circle::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\circle.php on line 4
Strict Standards: Declaration of square::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\square.php on line 17
I receive such messages when run
function resize($intSize) { // this on circle or square class
parent::resize($intSize, $intSize);
}
where parent::resize on shape class ... when run a function from square (or circle) extends rectangle (or ellipse) both extend shape,... in other words when in a class[eg square] function (class extends indirectly)...eg shape class. I get these warnings when extend directly [eg rectangle], these no appear...well how fix?