FAQ
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

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupphp-internals @
categoriesphp
postedJan 4, '10 at 6:00a
activeJan 4, '10 at 6:01a
posts2
users1
websitephp.net

1 user in discussion

Dark9: 2 posts

People

Translate

site design / logo © 2022 Grokbase