简单或比较中的PHP UndefinedFunctionException
我正在做一个定制的网上商店项目。目前,我在使用我的一个类时遇到一个奇怪的错误:简单或比较中的PHP UndefinedFunctionException,php,exception,Php,Exception,我正在做一个定制的网上商店项目。目前,我在使用我的一个类时遇到一个奇怪的错误: namespace Services\MyServices; class MyAppService { protected function someMethod($transfer_id) { ... $hash1 = sha1($someValue1); $hash2 = sha1($someValue2); $hash3 = sha1(
namespace Services\MyServices;
class MyAppService {
protected function someMethod($transfer_id) {
...
$hash1 = sha1($someValue1);
$hash2 = sha1($someValue2);
$hash3 = sha1($someValue3);
// The following code is in line 144
$checkHash = (($hash1 == $transfer_id) || ($hash2 == $transfer_id) || ($hash3 == $transfer_id));
...
}
}
致命错误:调用未定义的函数Services\MyAppService\()
未捕获的PHP异常UndefinedFunctionException:“试图在/webspace/…/Services/MyAppService/MyAppService.PHP第144行从命名空间“Services\MyAppService.”调用函数“”
所以第144行只是一个简单的OR比较,不是吗?这里可能有什么问题?在
(
PHP正在解释为函数名…?使用十六进制编辑器检查源代码和/或重新键入该行。就这样!非常感谢!我永远不会发现此问题。我不知道如何键入此字符,但现在它不见了:-)