Dear PHP
gurus. Crawled across the expanses of the Internet in search of a single script. Stumbled upon an interesting option. Maybe among you there are fans of the movie, and someone watched the movie "Social Network". At the very beginning of the film describes the creation of the site "FACEMASH.COM"
. On the site "HABRAHABR.RU"
found the script of this site. HERE . At the end of the instructions describes the file functions.php
. Here is its content:
<? PHP / / Вычислить ожидаемый результат% Ожидается функцию ($ Rb, Ra $) { возвращает 1 / (1 + ПР (10, ($ $ Rb-Ra) / 400)); } / / Вычислить новую оценку winnner Функция выигрыша ($ оценка, $ ожидалось, $ K = 24) { вернуть $ оценка + $ K * (1 - $ ожидалось); } / / Вычислить новую счетом проиграл функция потерь ($ оценка, $ ожидалось, $ K = 24) { вернуть $ оценка + $ K * (0 - $ ожидалось); } >
The question is about the incomprehensible descriptions contained inside the code. If it's not difficult for anyone, please translate to php
.