forcing access to __PHP_Incomplete_Class object properties

前端 未结 8 1898
夕颜
夕颜 2020-11-30 06:43

I\'m writing a module for a php cms. In a function (a callback) I can access an object that comes from the framework code.

This object is of type __PHP_Incomp

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 07:07

    If you just need to access raw data (like class variables) from a PHP_Incomplete_Class object, you can use the foreach hack, or you can also do:

    $result_array = (array)$_SESSION['incomplete_object_index'];
    echo $result_array['desired_item'];
    

提交回复
热议问题