here's a scene in "Aladdin" where Genie calls Aladdin's clothes "so 3rd century." However, as we all know, the Genie was locked inside a lamp for the past 10,000 years, meaning that there is no way he could have known what the 3rd century was like.
This means that "Aladdin" actually takes place in the FUTURE, in at least 10,300 AD. The movie itself is set in a post-apocalyptic wasteland, one where only some Arabic culture has survived. The things called "magic" are actually just some of the technological marvels left behind by the previous civilization. These include flying carpets and genetically engineered parrots which can comprehend human speech instead of just mimicking it.
How else could the Genie do impressions of ancient, long-dead celebrities like Groucho Marx, Jack Nicholson, etc?