Putting together a math expression parser for PHP