Re: PHP Brain Teasers

From: Date: Wed, 04 Jul 2007 07:56:34 +0000
Subject: Re: PHP Brain Teasers
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-258225@lists.php.net to get a copy of this message
Jochem Maas wrote: > Jochem Maas wrote: >> three for the price of one, cheap at half the price ... >> >> for ($me = 1; $you = $me; $me++); One for me and one for you? Everything that is mine is yours? To me, to you? >> $u = create_function("\$bond", "if (\$bond < 2) echo \"live\"; >> else die();") >> $u();$u();$u(); > > this one here should have been: > > $u = create_function("\$bond", "if (\$bond < 3) echo \"live\"; else > die();") > $u(1);$u(2);$u(3); I started thinking it was "Live and Let Die" but then I realised I had the wrong movie and it's actually "You only live Twice". WHich is good cos Connery was a far better bond than Moore! >> $I = null; sleep(10); $I = rear(); function rear() {}; Dunno! :p

« previous php.general (#258225) next »