haphan / social-ranking

PHP 实现类似于 Reddit 和 HackerNews 的社交热点排名算法

dev-master 2016-01-21 02:37 UTC

This package is auto-updated.

Last update: 2024-09-05 02:56:24 UTC


README

#社交媒体排名算法:Reddit,HackerNews

这是一个 PHP 实现的多种社交媒体新闻“热门”排名算法。

Reddit 排名

HackerNews 排名

###使用方法

$ composer require haphan/social-ranking
<?php

require 'vendor/autoload.php';

use Haphan\SocialRanking\Reddit;
use Haphan\SocialRanking\HackerNews;

$redditScore = Reddit::score($age, $upVote, $downVote);
$hackerNewsScore = HackerNews::scoreV1($age, $upVote, $downVote);