note 82989 added to function.define
| From: | ceo at l-i-e dot com | Date: | Mon, 05 May 2008 15:30:56 +0000 |
| Subject: | note 82989 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139072@lists.php.net to get a copy of this message | ||
I'm not sure if it's version dependent, but apparently this works:
define('APPLICATION_NOW', time());
This can be quite handy for time-dependent code...
You can then do:
class foo {
$private now = APPLICATION_NOW;
}
and have a consistent time-stamp across the application, which is nice.
Works for me in 5.2.5
I didn't think it worked before...
----
Server IP: 69.147.83.197
Probable Submitter: 38.106.138.11
----
Manual Page -- http://www.php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/82989
Del: integrated -- https://master.php.net/note/delete/82989/integrated
Del: useless -- https://master.php.net/note/delete/82989/useless
Del: bad code -- https://master.php.net/note/delete/82989/bad+code
Del: spam -- https://master.php.net/note/delete/82989/spam
Del: non-english -- https://master.php.net/note/delete/82989/non-english
Del: in docs -- https://master.php.net/note/delete/82989/in+docs
Del: other reasons-- https://master.php.net/note/delete/82989
Reject -- https://master.php.net/note/reject/82989
Search -- https://master.php.net/manage/user-notes.php