2019-04-05 09:08:11 +02:00
|
|
|
class Program {
|
|
|
|
|
|
|
|
string[] testArray() {
|
|
|
|
return {'Machine' => 'Turing'};
|
|
|
|
}
|
|
|
|
|
|
|
|
callback[] testCallback() {
|
|
|
|
return {'callme' => void() { print("Hello world\n"); }};
|
|
|
|
}
|
|
|
|
|
2019-05-17 08:40:41 +02:00
|
|
|
public void main() {
|
2019-04-05 09:22:47 +02:00
|
|
|
callback[] $constr = {'print'};
|
2019-04-05 09:08:11 +02:00
|
|
|
print($this->testArray()['Machine'] + "\n");
|
|
|
|
$this->testCallback()['callme']();
|
|
|
|
print(true ? "TRUE\n" : false ? "true\n" : "false\n");
|
2019-04-05 09:13:29 +02:00
|
|
|
(void(string $name) { print("This should work too - $name.\n");})('AerScript');
|
2019-04-05 09:22:47 +02:00
|
|
|
$constr[0]('Test finished.' + "\n");
|
2019-04-05 09:08:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|