php-src/Zend/tests/ctor_promotion_additional_modifiers.phpt
Ilija Tovilo 011071a3b3
Improve invalid cpp modifier message
The ZEND_MODIFIER_TARGET_CPP should really have been called _PARAM, but we
shouldn't break API at this point.

Fixes GH-12069
Closes GH-12175
2023-09-11 16:23:43 +02:00

13 lines
241 B
PHP

--TEST--
Constructor promotion only permits visibility modifiers
--FILE--
<?php
class Test {
public function __construct(public static $x) {}
}
?>
--EXPECTF--
Fatal error: Cannot use the static modifier on a parameter in %s on line %d