In PHP, undeclared class properties/variables will default to "public" visibility.
Is there a way (for certain classes, but not all) to change the default visibility to "protected" (or private)?
I know it's good practise to declare them all normally. However in this case I have lots layers of model classes sourced from SQL views with lots of columns. I'd like these to default to "protected" (to prevent my frontend devs from using raw values without HTML escaping), and when "public" access is needed, I'll declare them as so. i.e. Seeing it's security related, I want to "whitelist public" rather than "blacklist protected/private".