Aer/tests/class_instance_arg.aer
belliash 55acf8111f
All checks were successful
The build was successful.
Assume private visibility for all class members by default.
In most (all?) modern OOP languages class members visibility is assumed to be private and programmer has to consciously set it to public or protected. PHP has the different approach what can cause a security flaws in written scripts. AerScript will not follow this way, as it seems to be conceptually broken.
2019-05-17 08:40:41 +02:00

20 lines
208 B
Plaintext

class Test1 {
}
class Test2 extends Test1 {
}
class Program {
object $t;
private void test(Test1 $t = new Test2) {
$this->t = $t;
var_dump($this->t);
}
public void main() {
$this->test();
}
}