]> granicus.if.org Git - php/commitdiff
Now this should make sense.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 2 Jul 2003 15:47:24 +0000 (15:47 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 2 Jul 2003 15:47:24 +0000 (15:47 +0000)
tests/lang/bug22510.phpt

index 0502df28af02b438075e0d215d8f28abeed23bc8..24bed4333965c7ce1b4af05d4e5919c2ad0ff2f9 100644 (file)
@@ -13,7 +13,7 @@ class foo
 
        function &method1() {
                print __CLASS__."::".__FUNCTION__."\n";
-               return $this->foo;
+               return @$this->foo;
        }
 
        function &method2() {
@@ -23,7 +23,7 @@ class foo
 
        function method3() {
                print __CLASS__."::".__FUNCTION__."\n";
-               return $this->foo;
+               return @$this->foo;
        }
 }
 
@@ -88,28 +88,9 @@ ouch($bar);
 $bar->instance->finalize();
 print "I'm alive!\n";
 ?>
---EXPECT--
+--EXPECTF--
 ok1
 bar::run1
 foo::method1
-foo::method1
-foo::finalize
-done!
-ok2
-bar::run2
-foo::method2
-foo::method2
-foo::finalize
-done!
-ok3
-bar::run3
-foo::method3
-foo::method3
-foo::finalize
-done!
-ouch
-bar::run1
-foo::method1
-foo::method1
-foo::finalize
-I'm alive!
+
+Fatal error: Only variables or references can be returned by reference in %s on line %d