Static properties and methods in php can directly accessible without creating object of class. You can declare static property and method using static keyword.
<?php class User{ public static $name; static function getName(){ self::$name = "Ataur Rahman"; } } User::getName(); echo User::$name;