From: leroutier at gmail dot com Operating system: Linux PHP version: 5.2.11 PHP Bug Type: Feature/Change Request Bug description: Need a way to force calls to time() to be replaced by $_SERVER['REQUEST_TIME']
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 bug report at http://bugs.php.net/?id=50065&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50065&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50065&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50065&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50065&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50065&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50065&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50065&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50065&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50065&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50065&r=support Expected behavior: http://bugs.php.net/fix.php?id=50065&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50065&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50065&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50065&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50065&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50065&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50065&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50065&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50065&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50065&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50065&r=mysqlcfg