--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 %d unicode(8) "original" unicode(8) "original" Pass a function call that returns a reference: unicode(8) "original" unicode(7) "changed" Pass a static method call that returns a value: Strict Standards: Only variables should be passed by reference in %s on line %d unicode(8) "original" unicode(8) "original" Pass a static method call that returns a reference: unicode(8) "original" unicode(7) "changed" Pass a method call that returns a value: Strict Standards: Only variables should be passed by reference in %s on line %d unicode(8) "original" unicode(8) "original" Pass a method call that returns a reference: unicode(8) "original" unicode(7) "changed"