Cannot use ‘static’ as constant modifier

Description

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

Example

<?php

class X {
     private static const A  = 1;
}

?>

Solutions

  • Remove the option from the constant signature.