Re: Friday - Return of Brain Teasers
| From: | iostream | Date: | Fri, 05 Oct 2012 20:50:00 +0000 |
| Subject: | Re: Friday - Return of Brain Teasers | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319379@lists.php.net to get a copy of this message | ||
If you want to execute some code...
I'm sure you've all heard of the new "goes to" operator by now, but I hope it might be new to somebody.
$i = 10;
while ($i --> 0) { // while $i goes to 0
echo $i ."\n";} On 2012-10-05 22:34, Steven Staples wrote:
Subject: [PHP] Friday - Return of Brain TeasersIs this supposed to execute to anything? I got this: Warning: require(1) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\cowbell.php on line 1 Fatal error: require() [function.require]: Failed opening required '1' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cowbell.php on line 1 -- I do know what it means, just thought maybe there was something more significant to it than this... "Guess what? I got a fever. And the only prescription...is more cow bell"About five-and-a-half years ago, we had a brainteasers thread goingon[1]. Last year it was briefly resurrected[2], and both times got some good content and dialogue going. So I'd like to reprise the thread in 2012, as well. Those of you connected to me on Facebook (parasane) or Twitter (@oidk) might already have seen it, but a simple one to get things rolling:<?php require ++$cowbell; ?>