php-parser/test/code/parser/stmt/class/constModifierErrors.test
2016-07-05 23:01:06 +02:00

32 lines
488 B
Plaintext

Invalid class constant modifiers
-----
<?php
class A {
static const X = 1;
}
-----
!!php7
Cannot use 'static' as constant modifier on line 3
-----
<?php
class A {
abstract const X = 1;
}
-----
!!php7
Cannot use 'abstract' as constant modifier on line 3
-----
<?php
class A {
final const X = 1;
}
-----
!!php7
Cannot use 'final' as constant modifier on line 3
-----
<?php
class A {
public public const X = 1;
}
-----
Multiple access type modifiers are not allowed on line 3