問題已解決,這是一個錯誤,請參閱https://github.com/docker-library/php/issues/133真正奇怪的是,我一直在我的框架中使用它,但突然它停止了對這個特定示例的工作。在執行這部分邏輯之前,它多次使用沒有問題......不知道為什么這部分不起作用。class DailyCompetitionWinnersFactory extends Factory{ public static $table = 'tf_dc_winners'; public static $child_item_class_name = DailyCompetitionWinnersItem::class;}abstract class Factory extends coreClass{ static $factory_instance_counter = 0; static $child_item_class_name = null; static $table = null; protected $orig_handled_obj_array = null; protected $handled_obj_array = null; public static function Create() { return new static(); }}創建新實例DailyCompetitionWinnersFactory::Create()我得到 DailyCompetitionWinnersFactory 的實例,但它沒有定義任何靜態屬性。
后期靜態綁定中的對象靜態屬性
慕碼人2483693
2022-10-22 15:41:17