php: add linear LSQ-fit snippet