用 PHP 写只有一行代码的文本计数器

来自叶宁的Blog,很精妙

<?php
file_put_contents($fileName,file_exist($fileName)?1:
(file_get_contents($fileName)+1));
?>

<?php
echo sprintf(($a=@file_get_contents('/tmp/counter.txt')+1),
file_put_contents('/tmp/counter.txt', $a));
?>

<?php
($a=@file_get_contents('/tmp/counter.txt')+1) | file_put_contents('/
tmp/counter.txt',$a) | print($a);
?>