Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70281 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21595 invoked from network); 22 Nov 2013 12:03:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2013 12:03:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:51684] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/14-28674-9284F825 for ; Fri, 22 Nov 2013 07:03:54 -0500 Received: from [192.168.2.20] (ppp-88-217-82-160.dynamic.mnet-online.de [88.217.82.160]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id A7378404D7; Fri, 22 Nov 2013 13:04:10 +0100 (CET) To: Oleg Poludnenko Cc: Kevin Ingwersen , Nikita Popov , PHP internals In-Reply-To: References: <1383682887.4097.47.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Fri, 22 Nov 2013 13:03:36 +0100 Message-ID: <1385121816.13163.53.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP RFC: Deffering functions by arguments (count or/and type) From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Fri, 2013-11-22 at 11:54 +0200, Oleg Poludnenko wrote: > Here there is a code sample: https://gist.github.com/uaoleg/7596995 That sample fails the Liskov substitution principle. Any instance of figure has to have a calcPerimeter method taking zero arguments else you can't use them interchangeably what the base class should guarantee. http://en.wikipedia.org/wiki/Liskov_substitution_principle johannes