开发者

Scrambled class name passed to spl_autoload_call via call_user_func

I have discovered interesting behaviour of php while calling different classes dynamically. For some reason class name get scrambled and its look like slice of hashed string.

here is example of php code I'm trying to execute:

call_user_func(array('app_event', 'arrayItems'));

Here is backtrace of this event:

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
                    )

            )

    )
 ...
 );

Can anybody explain what em I doing wrong and what can cause sting app_event to be translated in to j7ltlqmoy?

UPDATE

Script does work on all other classes and throws this weird text only when requested method is not implemented. I have managed to make my application work, however it still does not explain why does it scramble names instead of throwing error?

UPDATE 2

This event also occurs (tested on PHP 5.3.10) when you are trying to call method statically and 开发者_如何学Cstatic property is not declared. It can be fixed by declaring method static.

UPDATE 3

As mentioned in comment to my bug report, this issue is caused by Zend Guard Loader


As mentioned in comment to my bug report, this issue is caused by Zend Guard Loader

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜