Skip to content

Commit b45fafe

Browse files
committed
Add test file
Forgot to git add this.
1 parent 692826d commit b45fafe

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Zend/tests/nullsafe_operator/026.phpt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
Nullsafe chain in static property / method name
3+
--FILE--
4+
<?php
5+
6+
class Test {
7+
}
8+
9+
$null = null;
10+
11+
try {
12+
Test::${$null?->foo}->bar;
13+
} catch (Error $e) {
14+
echo $e->getMessage(), "\n";
15+
}
16+
17+
try {
18+
Test::{$null?->foo}()->bar;
19+
} catch (Error $e) {
20+
echo $e->getMessage(), "\n";
21+
}
22+
23+
?>
24+
--EXPECT--
25+
Access to undeclared static property Test::$
26+
Method name must be a string

0 commit comments

Comments
 (0)