Is it possible to have a function with two returns like this:
function test($testvar)
{
// Do something
return $var1;
return $var2;
}
<
Languages which allow multiple returns usually just convert the multiple values into a data structure.
For example, in Python you can return multiple values. However, they're actually just being returned as one tuple.
So you can return multiple values in PHP by just creating a simple array and returning that.