Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34293 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89303 invoked by uid 1010); 31 Dec 2007 11:58:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89287 invoked from network); 31 Dec 2007 11:58:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2007 11:58:47 -0000 Authentication-Results: pb1.pair.com header.from=mikko.koppanen@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=mikko.koppanen@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.191 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mikko.koppanen@gmail.com X-Host-Fingerprint: 209.85.128.191 fk-out-0910.google.com Received: from [209.85.128.191] ([209.85.128.191:39451] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/FA-02434-679D8774 for ; Mon, 31 Dec 2007 06:58:47 -0500 Received: by fk-out-0910.google.com with SMTP id f33so5536794fkf.7 for ; Mon, 31 Dec 2007 03:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=5/FX7zq810FnPl0LxSexALU3K1dyR3dg4emihHD/8Qo=; b=p/ZqBPbJCRTPhrfwHnqtMBM7/aBB+AvwqE+1SIbv3VZ86jLXP6TLVX2y/Iyll19kHvJSjUjagZWXjg6YDfUM5iCaT05nk4ReSdpV9sAbOU3wmcKp00m+trMSz1k7NfKKfrWwPAfivmWJe0f2dE8kGtfs+bG9pAQAwtTULIXrE5E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=NZv48kfs5n6Scg/wlujdwAfd6BJG3YIPdenGaniXIZ61IvIaWuAA3BvboGxcptYRqVUj+KqWnPlhUX3bFJ0CBw+IZntnC4DBMlX4vQy+0u/cs/8SfOxFG1UpnJnEZXdbYdTm9bAlhveWiJZIqZVu5kSvgfbaQATcnAwkkmB8Ei8= Received: by 10.82.177.3 with SMTP id z3mr21862167bue.35.1199102324695; Mon, 31 Dec 2007 03:58:44 -0800 (PST) Received: by 10.82.171.18 with HTTP; Mon, 31 Dec 2007 03:58:44 -0800 (PST) Message-ID: <8cf711460712310358l3bd6b5b5sb90fc1e328561d51@mail.gmail.com> Date: Mon, 31 Dec 2007 11:58:44 +0000 Sender: mikko.koppanen@gmail.com To: "=?ISO-8859-1?Q?Fredrik_Holmstr=F6m?=" Cc: internals@lists.php.net In-Reply-To: <8697e5310712310343v16f4ec02s2e04f9e608fefaf0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8302_24946909.1199102324688" References: <8697e5310712310328n4c0fa235wb5654178028942bd@mail.gmail.com> <20071231113414.GD7861@mint.phcomp.co.uk> <8697e5310712310343v16f4ec02s2e04f9e608fefaf0@mail.gmail.com> X-Google-Sender-Auth: 29460c2138557f96 Subject: Re: [PHP-DEV] Re: Exceptions instead of Fatal Error when calling non existent method? From: mkoppanen@php.net ("Mikko Koppanen") ------=_Part_8302_24946909.1199102324688 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > Yes, I'm aware of call() but it's very slow. Also it's not feasible to > have > *all* my classes extend a base class with the a call containing a throw > InvalidMethodException, and what if I need to use 3rd party libraries that > make use of call in some other way. __call() is a hack, that, at best, > work > 50% of the time. > Calling methods without knowing that they exist sounds like a hack to me. How about using abstract classes or interfaces? -- Mikko Koppanen ------=_Part_8302_24946909.1199102324688--