In and out every 3 months for +90days

hello everyone

in most of countries where european citizens can enter without visa, we have 90 days every 180 days, but with exceptions like mexico,peru,morocco,lebanon where we can just go out few hours on day 89 and come back to get +90 again, without a limit of times

as now the only way to get an ikamet permission is by student resident permit, and apart to be very expensive you have also to attend to lessons because if not, they cancell your resident permit, i would like to know if this rule of in and out every 3 months it works in turkey for european citizens or not ?

because greek friends told me yes, other foreigners told me not, immigration officers told me not (but also in morocco they told me not and i went out and in again and got +90)

if someone can give me an anwer by his personal experience would be helpfull

thanks

confirmed 90 every 180days