Is static public vs public static the same in functionality? (I use PHP)
class Car{
static public $break='strong break';
public static $maxspeed=100;
}
Is it just for reading easier by using the first one?
Is static public vs public static the same in functionality? (I use PHP)
class Car{
static public $break='strong break';
public static $maxspeed=100;
}
Is it just for reading easier by using the first one?
There is absolutely no difference between static public and public static. The order of the keywords doesn't matter in this situation, use whatever you think will be more easily read.
It just for a variable permission or define as variable behaviour, keyword 'public' and 'static' are allowed to used in different order, output will be the same.