--- /dev/null
+--TEST--
+Testing constants (normal, namespace, class and interface)
+--FILE--
+<?php
+
+namespace foo;
+
+define('foo', 3);
+
+const foo = 1;
+
+class foo {
+ const foo = 2;
+}
+
+interface Ifoo {
+ const foo = 4;
+}
+
+$const = __NAMESPACE__ .'::foo'; // class
+$const2 = __NAMESPACE__ .'::Ifoo'; // interface
+
+var_dump( foo,
+ foo::foo,
+ namespace::foo,
+ foo::foo::foo,
+ $const::foo,
+ ::foo,
+ constant('foo'),
+ Ifoo::foo
+ );
+
+?>
+--EXPECT--
+int(1)
+int(1)
+int(1)
+int(2)
+int(2)
+int(3)
+int(3)
+int(4)
--- /dev/null
+--TEST--
+Testing visibility of object returned by function
+--FILE--
+<?php
+
+class foo {
+ private $test = 1;
+}
+
+function test() {
+ return new foo;
+}
+
+test()->test = 2;
+
+?>
+--EXPECTF--
+Fatal error: Cannot access private property foo::$test in %s on line %d
--- /dev/null
+--TEST--
+Using the same function name on interface with inheritance
+--FILE--
+<?php
+
+interface Itest {
+ function a();
+}
+
+interface Itest2 {
+ function a();
+}
+
+interface Itest3 extends Itest, Itest2 {
+}
+
+?>
+--EXPECTF--
+Fatal error: Can't inherit abstract function Itest2::a() (previously declared abstract in Itest) in %s on line %d