我应该如何改变功能内容?PHP


How should i change function content ? PHP

我想在几分钟内添加time()函数。

我该怎么做呢?

function time() {
    return time() + 60*10;
}

死:

Fatal error: Cannot redeclare time() in /home/matan/domains/only4gamer.com/public_html/Framework/config.php on line 20

请帮忙!由于

不能重新声明php内置函数名。而是使用

function _time() {
return time() + 60*10;
}

或其他未被php保留的名称。

有关内置函数的更多信息,请查看:http://php.net/manual/en/indexes.functions.php

PHP已经有一个时间函数:http://php.net/manual/fr/function.time.php您不能创建与PHP本机函数同名的函数。您需要找到另一个名称;