Skip to content

Commit 717134e

Browse files
committed
Add test for promoted property in free function
1 parent 4200794 commit 717134e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
Constructor promotion cannot be used in a free function
3+
--FILE--
4+
<?php
5+
6+
function test(public $prop) {}
7+
8+
?>
9+
--EXPECTF--
10+
Fatal error: Cannot declare promoted property outside a constructor in %s on line %d

0 commit comments

Comments
 (0)