Skip to content

Commit 44db46c

Browse files
committed
Add name mangling test
1 parent c716343 commit 44db46c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Zend/tests/clone/clone_with_011.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Clone with name mangling
3+
--FILE--
4+
<?php
5+
6+
class Foo {
7+
private string $bar = 'default';
8+
}
9+
10+
try {
11+
var_dump(clone(new Foo(), ["\0Foo\0bar" => 'updated']));
12+
} catch (Throwable $e) {
13+
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
14+
}
15+
16+
?>
17+
--EXPECT--
18+
Error: Cannot access property starting with "\0"

0 commit comments

Comments
 (0)