# hope add func_alias() function

- Thread: https://externals.io/message/46597
- Original archive: https://news-web.php.net/php.internals/46597
- Started by dark9 on 2010-01-04T05:45:39+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #46597 — dark9 — 2010-01-04T05:45:39+00:00

URL: https://externals.io/message/46597#46597

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
