Access variable in class

后端 未结 5 944
孤独总比滥情好
孤独总比滥情好 2021-01-26 01:03

i would like to access an variable, which is in an class (not as an instance of an class) For example

class myclas
{
private $list=array(\'1\',\'2\',\'3\');
[...         


        
5条回答
  •  伪装坚强ぢ
    2021-01-26 01:56

    For your edit, see this other beatiful guide about classes and visibility:

    http://www.php.net/manual/en/language.oop5.visibility.php

提交回复
热议问题