3 ms·
I was working forwards from the Ruby example for all of these, so I may have implemented the Clojure one in a weird way. PHP cheats a bit to be the shortest, s
by adambard 14y ago
I was working forwards from the Ruby example for all of these, so I may have implemented the Clojure one in a weird way.
PHP cheats a bit to be the shortest, since it just looks up files to execute and renders stdout as the result, removing the need for routing.
- antihero 14y agoWell, that's one of the few "advantages" of PHP. Though PHP allows this to happen easily, it's a fairly terrible idea for production code - the shortest isn't always the best. In reality you'd use a macroframework like Symfony or a micro like Ham https://github.com/radiosilence/Ham https://github.com/radiosilence/Ham
- cpress 14y agoThere is a microwork made from Symfony components called Silex: http://silex.sensiolabs.org http://silex.sensiolabs.org. Edit: I mis-read; reworded for clarity.