Re:In many ways PHP is just now starting to come into its own
by kailuowang on Saturday August 24, 2013 @08:54AM
(#6268516)
The code example he gave in ruby and PHP demonstrate perfectly that the PHP version is verbose (not to mention that the ruby code isn't the most concise one). It could be just me, who, as a develop, is sensitive to every single unnecessary characters in the code, which happens a lot in that couple lines of php code.
[ Parent
| on HN ]
Re:In many ways PHP is just now starting to come into its own
by memla on Saturday August 24, 2013 @09:10AM
(#6268539)
That example is framework specific. Change the php framework to laravel and this:
$topic = $this->get('model.Topic')->find($topic_id);
$this->get('guardian')->ensureVisible($topic);
becomes this: $topic = Topic::find($topicId);
Guardian::ensureVisible($topic);