Re: Friday - Return of Brain Teasers

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

 



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:  Friday - Return of Brain Teasers

     About five-and-a-half years ago, we had a brainteasers thread going
on[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; ?>


Is 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"




--
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