On the use of static methods and static variables

Why does this report an error syntax error: unexpected"="
how should I write it?

public static $arr=array();
public static function test($str){
     $self::arr["time"]=$str;//
}
Php
Mar.14,2021

. self::$arr


when using static variables, you only need self::$arr instead of adding the $symbol before self.


the first two bigwigs are right

Menu