Skip to content

Commit 69ef324

Browse files
committed
Generate constant declarations with the CONST_CS flag for PHP 7.x
1 parent 626e909 commit 69ef324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/gen_stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,10 @@ private function getGlobalConstDeclaration(EvaluatedValue $value, iterable $allC
19681968
$cConstValue = $value->getCConstValue($allConstInfos);
19691969

19701970
$flags = "CONST_PERSISTENT";
1971+
if ($this->phpVersionIdMinimumCompatibility !== null && $this->phpVersionIdMinimumCompatibility < 80000) {
1972+
$flags .= " | CONST_CS";
1973+
}
1974+
19711975
if ($this->isDeprecated) {
19721976
$flags .= " | CONST_DEPRECATED";
19731977
}

0 commit comments

Comments
 (0)