?php
class Foo {
public static function zzz(string $x): string {
return $x
}
errors as follows:
/home/jax/sample/foo.php
3:unexpected tokens
3:'}' expected
3:expected function body
with "Sx" highlighted.
Without the argument hint, it errors on ':'
<?php
class Foo {
public static function zzz( $x): string {
return $x
}
which throws:
/home/jax/work/herwheel3/src/lib/model/foo.php
3:'}' expected
3:expected function body
with the colon ":" highlighted.