so in php, you don't have define the field in a class first like java , is that correct??
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's documentation on this? and what is the correct term for such behaviour, i dont think it is called adding field on the fly