mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
15 lines
285 B
PHP
15 lines
285 B
PHP
--TEST--
|
|
Get-only virtual property must not specify asymmetric visibility
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public private(set) int $bar {
|
|
get => 42;
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: get-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d
|