Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 通过call\U user\U func传递给spl\U autoload\U call的加扰类名称_Php_Spl Autoload Call - Fatal编程技术网

Php 通过call\U user\U func传递给spl\U autoload\U call的加扰类名称

Php 通过call\U user\U func传递给spl\U autoload\U call的加扰类名称,php,spl-autoload-call,Php,Spl Autoload Call,我发现了php在动态调用不同类时的有趣行为。 出于某种原因,类名会被置乱,看起来就像是散列字符串的一部分 下面是我尝试执行的php代码示例: call_user_func(array('app_event', 'arrayItems')); 以下是此事件的回溯: Array ( [0] => Array ( [function] => autoLoader [class] => init [type] => ::

我发现了php在动态调用不同类时的有趣行为。 出于某种原因,类名会被置乱,看起来就像是散列字符串的一部分

下面是我尝试执行的php代码示例:

call_user_func(array('app_event', 'arrayItems'));
以下是此事件的回溯:

Array
(
[0] => Array
    (
        [function] => autoLoader
        [class] => init
        [type] => ::
        [args] => Array
            (
                [0] => j7ltlqmoy
            )

    )

[1] => Array
    (
        [function] => spl_autoload_call
        [args] => Array
            (
                [0] => j7ltlqmoy
            )

    )

[2] => Array
    (
        [file] => /site/class.app.php
        [line] => 107
        [function] => call_user_func
        [args] => Array
            (
                [0] => Array
                    (
                        [0] => app_event
                        [1] => arrayItems
                    )

            )

    )
 ...
 );
谁能解释一下em I做错了什么,以及什么会导致sting应用程序事件被翻译成j7ltlqmoy

更新
脚本在所有其他类上都可以工作,并且只有在请求的方法未实现时才会抛出这个奇怪的文本。我已经成功地使我的应用程序工作,但是它仍然没有解释为什么它将名称置乱而不是抛出错误

更新2
当您尝试静态调用方法且未声明static属性时,也会发生此事件(在PHP5.3.10上测试)。可以通过声明方法static来修复它

更新3

正如我的评论中提到的,这个问题是由Zend Guard Loader引起的。正如我的评论中提到的,这个问题是由Zend Guard Loader引起的。你能给出一个简短的脚本,我们可以用它来重现这个问题吗?对所有源文件中的字符串
j7ltlqmoy
进行grep。可能是依赖于该类,或者在某个地方它正在执行一个
class\u exists()
调用…复制脚本,或者它没有发生:我也看到过这种情况。您找到原因了吗?当您试图调用未声明为静态的方法时,似乎会发生这种情况