#50065 [Opn->Bgs]: Need a way to force calls to time() to be replaced by $_SERVER['REQUEST_TIME']

From: Date: Tue, 03 Nov 2009 19:50:55 +0000
Subject: #50065 [Opn->Bgs]: Need a way to force calls to time() to be replaced by $_SERVER['REQUEST_TIME']
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-144215@lists.php.net to get a copy of this message
ID: 50065 Updated by: johannes@php.net Reported By: leroutier at gmail dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.2.11 New Comment: There are too many cases where different time() calls expect different results and in your example we'd need to "break" the whole date system to return fake data. Nothing that can be done in a sane way. Previous Comments: ------------------------------------------------------------------------ [2009-11-03 17:42:13] leroutier at gmail dot com Description: ------------ Got lazy developers that can't understand that any call to date, time, strftime and so on without a timestamp as parameter would always mean extra system calls. So, they get fun adding shitty code like : $caching_time = mktime(1,0,0,date("m"),date("d")+1,date("Y"))- time(); Cool, 4 syscalls in one expression. As I can't make them think about my dear servers (they always say something like "add more servers"), I'd like a way in PHP configuration to bypass all calls to time() and timestamp-less calls to be replaced by $_SERVER['REQUEST_TIME'] I understand the correct solution would be to correct their code but I'm sure lots of sysadmins would like this. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50065&edit=1

« previous php.bugs (#144215) next »