Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21427 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26771 invoked by uid 1010); 5 Jan 2006 06:17:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26756 invoked from network); 5 Jan 2006 06:17:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2006 06:17:28 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:3451] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 33/28-34518-6F9BCB34 for ; Thu, 05 Jan 2006 01:17:27 -0500 Received: from localhost ([127.0.0.1] helo=stumpy) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1EuNZv-00017m-00; Wed, 04 Jan 2006 21:22:23 -0800 Message-ID: <001801c611c0$1649b4c0$7d051fac@stumpy> To: "Andrew Yochum" Cc: References: <20060103205728.GF26280@desario.homelinux.net> <007001c6117d$1ba7e510$5c8be5a9@ohr.berkeley.edu> <20060105011450.GB26280@desario.homelinux.net> Date: Wed, 4 Jan 2006 22:20:11 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] Re: __call overload detection From: pollita@php.net ("Sara Golemon") >> This'll do what you want: >> >> http://libssh2.org/dist/callable-1.0.tgz >> > Thanks Sara. Nice to see that others have the need. Works like a > charm. You rock. > Just for clarification. I didn't have a need for this, it's just something I threw together today since it was simple... > Marcus, is this along the lines of what you had in mind for the > (possible) implementation? This doesn't use interfaces, but that seems > trivial. I wasn't clear if you'd envisioned taking it one step further > and do the check before invocations of __call or not. > I left interfaces out 'cause I wanted it to work easily with PHP4. As to introducing the check prior to invoking __call()... that seems like overkill. If __call() doesn't think it should be callable it should trigger_error() or throw when its invoked that way. __callable() only has meaning for avoiding the errors that calling an uncallable function would produce. -Sara