It's not as good as Machado's on an AAV (Machado, 10 yrs, 300; Harper 13 / 330). And, it's a better deal than Stanton (The Yankees should never have traded for Stanton - that was ridiculous; they'd have been much better off paying for Harper as a lefty to pair with Judge instead of Stanton and Judge).
The thing about the contracts that has to be understood is that MLB teams get a ton of money from local revenue b/c they have 81 home games vs 8 in the NFL and local TV. But, this is actually a slowing down of contract growth.
And, it's a great deal for the Phillies. Contrary to the above, 13 years is not a bad deal. Harper is only 26 and in 13 years he'll be 39. And 13 years from now his contract will look average.
The other value of the deal is that there are no opt outs and it's a no trade clause. The value for Harper and the Phillies is that they can attract other free agents and those guys know that Harper won't be gone in two years.
Personally, although Harper has wow factor and will draw fans in for that in Philly, he's not a high average hitter and is not as good an all around player as a Trout or even Machado (who is a solid 3Bman).