Is safe to turn off iphone for 3 months
It is recommended that you store you iPhone at roughly 50% charge. If you store it for more then 6 months, then you should charge it back to 50%. 

For more information:
https://www.apple.com/batteries/maximizing-performance/