so in php you do not define the field in the class, first as java, is this true?
in java you cannot say
public class javac { int x; int y; public javaC() { this.z = 3; } }
but in php can you say that?
class phpC { $x; $y; public phpC() { $this->z = "omg"; } }
what is php documentation? and what is the correct term for this behavior, I don’t think it is called adding a field on the fly
user1118019
source share