Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:46599 php.internals:46600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79506 invoked from network); 4 Jan 2010 06:01:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2010 06:01:56 -0000 X-Host-Fingerprint: 222.73.46.46 unknown Received: from [222.73.46.46] ([222.73.46.46:20537] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/E7-12956-354814B4 for ; Mon, 04 Jan 2010 01:01:56 -0500 To: internals@lists.php.net,PHP Development Message-ID: <4B418452.6010103@rune.ws> Date: Mon, 04 Jan 2010 14:01:54 +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