I just noticed, both echo and return works fine for displaying content from a shortcode function in wordpress.
function foobar_short
Echo may work in your specific case but you definitely shouldn't use it. Shortcodes aren't meant to output anything, they should only return content.
Here's a note from the codex on shortcodes:
Note that the function called by the shortcode should never produce output of any kind. Shortcode functions should return the text that is to be used to replace the shortcode. Producing the output directly will lead to unexpected results.
http://codex.wordpress.org/Function_Reference/add_shortcode#Notes