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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d196-2c37f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d196-2c37f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?