I haven't got a better clarity after a long search about, using keyword public
in a __constructor
function in a PHP class.
- People saying
__constructor
itself is public by default. So I don't have to use mention aspublic
. - Will there be no change if I mention or don't as
public
inpublic function __constructor
in PHP? - what is the best practice of declaring a
__constructor
in PHP? with or without the keywordpublic
? - what are the disadvantages or issues that I will face if I don't mention the keyword
public
in-front of apublic function __constructor
?