This seems unlikely, but not unheard of if all other plans fall through.
As SL pointed out in another thread, acquiring PG and extending him (while also signing Hayward) was going to cost us AB, Crowder, Smart, and Tatum - a total of ~$25.7M. Of course that's not a deal Danny would do just to extend PG when he can just essentially trade Crowder and AB for him, but acquiring Melo and Porzingis would put us in a similar - even worse - situation to that one because of Melo's salary/trade kicker. We would also need to take into account Porzingis' salary. This would be about $34.7M total ($30.17) + $4.5M). As you can see, a trade still couldn't be consummated because salaries are not close enough. Adding Rozier might get you there, but I think we are still a few hundred thousand dollars short.
I think in the above case, Danny could consider it if he REALLY loves Porzingis, but I have my doubts. That package above - this year's #3 pick, Smart, Rozier, AB, and Crowder isn't so far off base for Porzingis. We could even bring in a third team to take AB and/or Rozier and send another 1st to NYK if that's what they desired. We would then basically be 'absorbing' Melo's salary, which is only for two more years. As BJ mentions above, though, it does totally gut our bench/team , and for what? Melo?
Again, I don't think this is Plan A, or even Plan B, but it's not an unheard of scenario.