PHP time()不计算

I'm a little puzzled by the following

  echo "<p>" . time() . "</p>"; // current unix timestamp
  echo "<p>" . time() - 60*60*1 . "</p>"; // 1 hours ago
  echo "<p>" . date('H:i',time() - 60*60*1 ) . "</p>"; // 1 hours ago

returns

 1351193453
 -3600
 20:30

Why is not time()-3600 evaluated when standing by itself?

It's an operator precedence issue. Subtraction is evaluated after concatenation. Wrap brackets around it, and it'll be fine:

echo "<p>" . (time() - 60*60*1) . "</p>";

Try:

echo "<p>" . (time() - 60*60*1) . "</p>"; // 1 hours ago

Demo