Syntax unexpected T_STRING
<pre><code>function secondsToTime($inputSeconds) {

   $secondsInAMinute = 60;
   $secondsInAnHour  = 60 * $secondsInAMinute;
   $secondsInADay    = 24 * $secondsInAnHour;

    $days = floor($inputSeconds / $secondsInADay);

   $hourSeconds = $inputSeconds % $secondsInADay;
   $hours = floor($hourSeconds / $secondsInAnHour);

    $minuteSeconds = $hourSeconds % $secondsInAnHour;
    $minutes = floor($minuteSeconds / $secondsInAMinute);


    $remainingSeconds = $minuteSeconds % $secondsInAMinute;
    $seconds = ceil($remainingSeconds);

    $obj = array(
        'd' =&gt; (int) $days,
        'h' =&gt; (int) $hours,
        'm' =&gt; (int) $minutes,
        's' =&gt; (int) $seconds
    );

    return $obj;
}
</code></pre>

<p>this function give's me an error:</p>

<pre><code>Parse error: syntax error, unexpected T_STRING on line 6
</code></pre>

<p>i call it like this:</p>

<pre><code>$start = new DateTime('2010-10-12');
$end = new DateTime('2010-10-14');
$seconds = round(abs($end-&gt;format('U') - $start-&gt;format('U')));
$obj = secondsToTime($seconds);
</code></pre>
