Wszystkie etapy powiodły się
The build was successful.
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.
19 wiersze
276 B
Plaintext
19 wiersze
276 B
Plaintext
class Test {
|
|
public void __construct(string $a) {
|
|
print("$a\n");
|
|
}
|
|
|
|
public void __construct(int $a, int $b) {
|
|
print("$a + $b = ", $a + $b, "\n");
|
|
}
|
|
|
|
}
|
|
|
|
class Program {
|
|
public void main() {
|
|
object $a, $b;
|
|
$a = new Test('Hello world!');
|
|
$b = new Test(4, 7);
|
|
}
|
|
}
|