pocketmine\utils\Utils::getCallableIdentifier PHP Method

getCallableIdentifier() public static method

Generates an unique identifier to a callable
public static getCallableIdentifier ( callable $variable ) : string
$variable callable
return string
    public static function getCallableIdentifier(callable $variable)
    {
        if (is_array($variable)) {
            return sha1(strtolower(spl_object_hash($variable[0])) . "::" . strtolower($variable[1]));
        } else {
            return sha1(strtolower($variable));
        }
    }