]> granicus.if.org Git - php/commitdiff
Add test: unmangling private properties in anon class instances
authorSteven Hilder <stevehilder@yahoo.co.uk>
Thu, 6 Aug 2015 16:55:54 +0000 (16:55 +0000)
committerSteven Hilder <stevehilder@yahoo.co.uk>
Thu, 6 Aug 2015 16:56:05 +0000 (16:56 +0000)
Zend/tests/anon/012.phpt [new file with mode: 0644]

diff --git a/Zend/tests/anon/012.phpt b/Zend/tests/anon/012.phpt
new file mode 100644 (file)
index 0000000..d82f237
--- /dev/null
@@ -0,0 +1,11 @@
+--TEST--
+Ensure correct unmangling of private property names for anonymous class instances
+--FILE--
+<?php
+var_dump(new class { private $foo; });
+?>
+--EXPECT--
+object(class@anonymous)#1 (1) {
+  ["foo":"class@anonymous":private]=>
+  NULL
+}