2 plus ones
Shared publicly•View activity
View 9 previous comments
- I understand enumerators, but what do you mean with properties?Nov 6, 2016
What Php calls "Properties" are actually class fields/attributes.
Even OO JS has Properties.
A property implementation has been needed in Php for a long time.Nov 6, 2016
- Nov 6, 2016
- From your link:
"Class member variables are called "properties". You may also see them referred to using other terms such as "attributes" or "fields", but for the purposes of this reference we will use "properties"."
I think they already said it all.
But just in case...Nov 6, 2016
- Don't the magic functions __get() and __set() help cover making the fields properties?Nov 6, 2016
- They help, but for bigger classes, with a big state inprint, they're not an elegant solution. They're a hack.
There are also workarounds for Enumerators as well...Nov 6, 2016
Add a comment...