Assume private visibility for all class members by default.
已通過所有檢查
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.
此提交包含在:
2019-05-17 08:40:41 +02:00
父節點 48ccd7fef0
當前提交 55acf8111f
共有 41 個檔案被更改,包括 72 行新增84 行删除

查看文件

@@ -1,6 +1,6 @@
class Program {
string cycle(char $a, char $b, int $i = 0) {
private string cycle(char $a, char $b, int $i = 0) {
static bool[] $switches;
if($switches[$i])
$switches[$i] = !$switches[$i];
@@ -9,7 +9,7 @@ class Program {
return ($switches[$i]) ? $a : $b;
}
void main() {
public void main() {
for(int $i = 1; $i < 3; $i++) {
print($i + $this->cycle('a', 'b') + PHP_EOL);
for(int $j = 1; $j < 5; $j++) {