$ cat -n Test.php
1 <?php
2
3 class Test {
4 yield;
5
6 public static function main() {
7 echo 'Hello World', "\n";
8 }
9
10 public function main() {
11 print('Main method')
12 }
13 }
$ xp compile -n Test.php
! Test.php: Errors {
Expected a type, modifier, property, annotation, method or "}", have ";" at line 4
Cannot redeclare method main() at line 10
Missing semicolon after invoke statement at line 11
}
× Compiled 1 file(s) to using lang.ast.emit.PHP72, 1 error(s) occurred
Memory used: 2219.24 kB (2269.96 kB peak)
Time taken: 0.011 seconds