I keep seeing this format in recent codes and even here:
class Class {
function this() {}
}
instead of
class Class {
[public/private/protected] function this() {}
}
when you declare a function without any keyword that is public by default.
Isn't it recommended to always specify the function scope?
You have to define function scope if you are going to use them as private or protected.
Isn't the first approach an old one?
What's the old and new if they are still accepted by PHP.
How are, in the first approach, defined private and protected functions?
you can not with first approach you have to use keywords.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With