Hello.
You can do something like this:
class Net
{
public static $ip = getenv("REMOTE_ADDR");
}
Get the return of a function and assign it directly to the property?
Or create a variable outside the class and assign it to a property (without using methods for this):
$ipUser = getenv("REMOTE_ADDR");
class Net
{
public static $ip = $ipUser;
}
It's because it's a class that only has properties, and these properties are being accessed in the static context, so I can not use a constructor or something like that ... or can I?