when making a class in php what is the difference between these two :
class Search
function __construct()
{
$this->variable1= 1234;
}
}
and
class Search
private $variable1;
$variable1=1234;
function __construct()
{
}
}
if i need to access a value across different methods does it make any difference which approach i chose?
thank you