A simple PHP calculator for the R-Class Rule