Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:46597 php.internals:46598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77329 invoked from network); 4 Jan 2010 06:00:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2010 06:00:25 -0000 Received: from [127.0.0.1] ([127.0.0.1:18065]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id E3/67-12956-8F3814B4 for ; Mon, 04 Jan 2010 01:00:24 -0500 X-Host-Fingerprint: 222.73.46.46 unknown Received: from [222.73.46.46] ([222.73.46.46:7646] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/57-12956-580814B4 for ; Mon, 04 Jan 2010 00:45:42 -0500 To: internals@lists.php.net,PHP Development Message-ID: <4B418083.9050009@rune.ws> Date: Mon, 04 Jan 2010 13:45:39 +0800 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 222.73.46.46 Subject: hope add func_alias() function From: dark9@rune.ws (dark9) php v5.3 added class_alias() function. same, i hope add func_alias() function is used to solve the problem without throwing an exception. Example: // Now class str { public static function len($str) { return strlen($str); // Warning is here, none throwing an exception // if u need exception, pls youself write ? // However, if this type of operation a lot? } } str::len(array()); // Warning in the above // Expected class str{} func_alias('strlen', array('str', 'len')); str::len(array()); // strlen same warning. // This a fast packaging method. btw: Sorry, I speak english very poorly. regards dark9@rune.ws