Re: Re: PHP Brain Teasers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 07. 4, szerda keltezéssel 16.20-kor Colin Guthrie ezt írta:
> Jochem Maas wrote:
> > this one should be easy:
> > 
> > function work($v) { echo "$v,"; }
> > foreach(array_merge(range(9,12),range(1,5)) as $ing)
> > 	work($ing);
> > 
> 
> 
> <dolly>Workin' 9 til' 5</dolly>
> 
> 
> On a similar theme:
> 
> function jack($all)
> {
>   static int $play = 0;
>   if ($all == 'work' && !$play)
>     return 'dull boy!';
>   $play++;
> }
> 

all work and no play makes jack a dull boy

greets
Zoltán Németh

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux