Re: Re: PHP Brain Teasers
| From: | Robert Cummings | Date: | Thu, 05 Jul 2007 14:23:14 +0000 |
| Subject: | Re: Re: PHP Brain Teasers | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258326@lists.php.net to get a copy of this message | ||
On Thu, 2007-07-05 at 10:19 -0400, Daniel Brown wrote:
> An easy one going on a previous theme. And see? Every so often,
> I come up with some good ideas like this thread.... albeit more
> intrusive than productive.... :-\
>
> <?
>
> global $eggs;
> global $chickens;
>
> function hatch($eggs) {
> return 1;
> }
>
> if(!hatch($eggs)) {
> echo Null;
> } else {
> count($chickens);
> }
> ?>
Don't count your chickens till they hatch.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'