On 2/18/08, Nick Stinemates <[EMAIL PROTECTED]> wrote:
> I have found, however, that if I ever need to return /multiple/ values,
> it's usually because of bad design and/or the lack of proper encapsulation.

Yeah, that's probably why most popular scripting languages support it.

In Ruby:

def foo
  1, 2
end

a, b = foo


In Python:

def foo
  return 1, 2

a, b = foo


In Perl:

sub foo
{
  return (1, 2);
}

(my $a, my $b) = foo;



--
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to