... FETCH returned_cursor INTO returned_row; :id := returned_row.id; EXCEPTION when others then :id := SQLERRM; END; }); $func->bind_param(":parameter1", $parameters[1]); $func->bind_param_inout(":id", \$return_value, 1000); $func->execute; }; ...