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
[email protected]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to