This comment is reply for 1300 匿名: PHPで関数をオブジェクトもしくはリファ...(n日後を返す関数を返す関数). Go to thread root.
yuin #1341(2007/07/22 09:14 GMT) [ PHP ] Rating1/1=1.00
1 2 3 4 5 6 7 8 9 10 11 12
function n_days_later($days) { return create_function('$d', 'return getdate(mktime( $d["hours"], $d["minutes"], $d["seconds"], $d["mon"], $d["mday"] + '. $days . ', $d["year"] ));'); } $five_days_later = n_days_later(5); $date = $five_days_later(getdate()); print_r($date);
Rating1/1=1.00-0+
[ reply ]
yuin
#1341()
[
PHP
]
Rating1/1=1.00
Rating1/1=1.00-0+