Reference
Last.fmhttp://jp.last.fm/
% mysqldump2email --conf /path/to/config.yaml
mysqldump:
command: /usr/bin/mysqldump
username: your-mysql-username
password: your-mysql-password
#host: localhost
zip:
command: /usr/bin/zip
# if encryption needed
#password: your-zip-password
mail:
from: user@example.com
to: user@example.com
route:
via: smtp
host: localhost:25
#route:
# via: sendmail
gspace:
enable: 0
directory: /
tmpdir: /tmp
#time_zone: Asia/Tokyo
for($year = 2004; $year < 2014; $year++){
$isLeapYear = checkdate(2, 29, $year) ? "leap year" : "not leap year";
echo "{$year} is {$isLeapYear}.\n";
}
$t = microtime_float();
for($i=1;$i<=1000000;$i++){
if(ctype_digit(1234567890)) {
print "";
}
}
print microtime_float()-$t."\n";
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$t=microtime_float();
for($i=1;$i<=1000000;$i++){
if(is_int(1234567890)) {
print "";
}
}
print microtime_float()-$t."\n";
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
// PHP 5の動作を模擬する簡単な関数
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}