I started today with learning object oriented PHP programming and I am struggling with the following problem:
I can set a variable equal to for example 10:
class exampleClass {
private $number = 10;
}
But I cannot set it equal to a function which returns 10:
class exampleClass {
private $number = exampleFunction();
}