hmm... considering the way I came up with that formula, I would suggest:
<?php
function linear($value, $source_begin, $source_end, $dest_begin, $dest_end) {
$multiplier = ($dest_end - $dest_begin) / ($source_end - $source_begin);
return $multiplier * $value + ($dest_begin - $source_begin);
}
echo linear(50, 0, 100, 100, 500);
?>
However, if you want to replicate exactly what linear does in Adobe After Effects, then you would need to do more research.