Welcome to the Browser-Base Game Zone forums!
Now, I did some testing and using only MySQL math, I managed to move >20,000 "people" or NPCs one point on a xy-plane each second without the CPU going crazy. And that was based on their current location, direction, and velocity. The RAM did however take some beating. It's rather weird though and I think I'll have to do some other tests because my servers might have been running some heavy-duty crap at the time.
If I understood everything correctly, then http://www.ape-project.org/ is the way to go.
How many!? 20,000 SQL writes a second? Well, you know, I saw shared host providers (paid, not free) that allow 60,000 SQL queries per hour This would be 28 million writes a day. And I don't think you could do it purely on SQL side (like one query to move them all at once) because of collision detection or other code that simply had to be done on PHP side. Not to mention that that's not all, you need also select from the table for each player to display the NPC placement.To me these numbers are insane (assuming it is one server architecture).