In Ruby on Rails, I can start my web application, just write in console: script/server. RoR contains small webserver and rich console tools, but I didn`t meet such tools in php frameworks. Are there any php frameworks contain small webserver and rich console tools?
2 Answers
Neither PHP, nor any of the PHP frameworks bring their own webserver. Some frameworks offer rake
like tools like Cake's bake
or ZF's Zend_Tool
. There is also Phing and Pake that are not specific to a framework. The closest to Gem in PHP is PEAR. You can start PHP in interactive mode from the shell with php -a
As of PHP 5.4 PHP also has it's own internal werbserver, which you can start from CLI with
php -S localhost:8000
You can read more about that feature at http://php.net/manual/en/features.commandline.webserver.php

- 312,688
- 75
- 539
- 559
CakePHP is the closest. Your models/views/controllers directories will be the same. All of the concepts like routes, active record, plugins, and scaffolding are similar. The active record implementation supports associated models (one-to-many, many-to-many, etc). This is something that is lacking in other php ORM implementations.
Here's an old (April 2007) Ask Metafilter that had some folks contributing frameworks to look at: CakePHP, Symfony, Mojavi, Code Igniter are the PHP MVC frameworks recommended. They suggested CI and Symfony over Cake.

- 11,606
- 10
- 35
- 40