Cannot use ‘abstract’ as constant modifier

Description

abstract` is an option for methods, and it is not available for class constants and properties.

Example

<?php

class X {
     private static const A  = 1;
}

?>

Solutions

  • Remove the option from the constant signature.