Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15870 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52418 invoked by uid 1010); 6 Apr 2005 14:29:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52374 invoked from network); 6 Apr 2005 14:29:23 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 6 Apr 2005 14:29:23 -0000 X-Host-Fingerprint: 80.168.8.116 iko.gotobg.net Linux 2.4/2.6 Received: from ([80.168.8.116:51414] helo=iko.gotobg.net) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id D6/21-19272-242F3524 for ; Wed, 06 Apr 2005 10:29:23 -0400 Received: from p54a0c93f.dip.t-dialin.net ([84.160.201.63] helo=[192.168.0.41]) by iko.gotobg.net with esmtpa (Exim 4.43) id 1DJBWv-0004ot-Uy; Wed, 06 Apr 2005 17:29:18 +0300 Message-ID: <4253F238.2090504@hristov.com> Date: Wed, 06 Apr 2005 16:29:12 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050219 MIME-Version: 1.0 To: Andrey Hristov CC: Marcus Boerger , Lukas Smith , internals@lists.php.net References: <20050406134609.82942.qmail@lists.php.net> <337442381.20050406155444@marcus-boerger.de> <4253F175.8010107@hristov.com> In-Reply-To: <4253F175.8010107@hristov.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] class_implements()/class_parents() accepting string parameter From: php@hristov.com (Andrey Hristov) Andrey Hristov wrote: > Marcus Boerger wrote: > >> Hello Lukas, >> >> Wednesday, April 6, 2005, 3:46:08 PM, you wrote: >> >> >>> Hi, >> >> >> >>> it would be very useful if class_implements()/class_parents() would >>> also handle a string containing a class name instead of requiring an >>> object instance. >> >> >> >> Class as it says does not need an instance. Can you send a patch? >> >> > Hello Marcus, Lucas, > I have made a patch for class_implements() : > > http://andrey.hristov.com/projects/php_stuff/patches/class_implements.patch.txt > > The function is here : > http://andrey.hristov.com/projects/php_stuff/patches/class_implements.c > > Andrey > and this is the test script : ./php -r 'interface iface1{}interface iface2{} class a implements iface1, iface2{} var_dump(class_implements(new a), class_implements("a"), class_implements("aaa"), class_implements("bbb", 0)); function __autoload($cname){ var_dump($cname);}' or