hello, I would like to test the result of a function like this: function() { // the value is peter return $value; } $name = "peter" if (function()==$name) { echo "something"}
function return_name($value) { return $value; } $name = "peter"; if($name == return_name("peter")) { echo "Peter was the specified name". } The other option would be to define it in the function itself.