PHPGame is a framework to develop web based games. It will include several features common to all games (DB, Templating), while at the same time producing quality PHP games. -> http://sourceforge.net/projects/phpgamedev/
By far the best because it's more a development environment specific for PHP and games rather than a game itself. This should have all the tools to make your first game.