CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2011
    Posts
    14

    OO: Why get warnings? indirect inheritance

    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?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: OO: Why get warnings? indirect inheritance

    PHP is one of a few languages that's not completely OOP. It does not support method overloading.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured