Hi everyone I had written function to format seconds in this way: 67s -> 00:01:07 . Then I've wanted add this feature to volt:
$volt->getCompiler()->addFunction('toHHMMSS', function($seconds) {
$t = round($seconds);
return sprintf('%02d:%02d:%02d', ($t/3600), ($t/60%60), $t%60);
});
But there are some problems with that. Phalcon throws me this:
Parse error: syntax error, unexpected ':', expecting ',' or ';' in index.volt.php on line 94
What's wrong with this code?