--TEST-- Pass function and method calls by reference and by value. --FILE-- returnVal()); var_dump($a); echo "Pass a method call that returns a reference:\n"; $a = "original"; foo($myC->returnReference()); var_dump($a); ?> --EXPECTF-- Pass a function call that returns a value: Strict Standards: Only variables should be passed by reference in %s on line 44 string(8) "original" string(8) "original" Pass a function call that returns a reference: string(8) "original" string(7) "changed" Pass a static method call that returns a value: Strict Standards: Only variables should be passed by reference in %s on line 55 string(8) "original" string(8) "original" Pass a static method call that returns a reference: string(8) "original" string(7) "changed" Pass a method call that returns a value: Strict Standards: Only variables should be passed by reference in %s on line 67 string(8) "original" string(8) "original" Pass a method call that returns a reference: string(8) "original" string(7) "changed"