Call_user_func yoluyla spl_autoload_call geçirilen şifreli sınıf adı

0 Cevap php

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.

burada yürütmek çalışıyorum php kod örneği:

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

İşte bu olayın backtrace olduğunu:

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
                    )

            )

    )
 ...
 );

Herkes em Ben ne yanlış yaptığını açıklayabilir miyim ve ne acı app_event için tercüme neden olabilir 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 static 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

0 Cevap