tedd wrote:
2b || !2b
this is not javascript dude.
$_2b | ~$_2b;
that said this is one of the coolest so far, nice one tedd.
Cheers,
tedd
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 7/6/07, tedd [EMAIL PROTECTED] wrote:
My favorite.
/world
End of the world. Great!
Brice
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 7/5/07, tedd [EMAIL PROTECTED] wrote:
My favorite.
/world
Fan-freaking-tastic! I've never seen it before (I live under a
rock), but it has so many potential uses.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--
PHP General Mailing List
while( TRUE ) {
$actions++;
$words--;
}
$bets = array(1,2,3,4,5);
unset( $bets );
$arr = array( 'this', 'that', 'times' );
$arr[] = 'behind';
for( $i = 0; $i = 6; $i++ ) {
$deep++;
}
for( $i = 0; $i = 5; $i++ ) {
$flies--;
}
thnx,
Chris
--
PHP General Mailing List
On 7/5/07, Chris Boget [EMAIL PROTECTED] wrote:
while( TRUE ) {
$actions++;
$words--;
}
Actions speak louder than words.
$bets = array(1,2,3,4,5);
unset( $bets );
All bets are off.
$arr = array( 'this', 'that', 'times' );
$arr[] = 'behind';
Behind the times.
for( $i = 0; $i =
Actions speak louder than words.
Yup.
All bets are off.
Indeed.
Behind the times.
Correct.
Deep Six.
Got it.
for( $i = 0; $i = 5; $i++ ) {
$flies--;
}
Time flies backwards? // Not sure on this one.
I wasn't sure if this one was done well enough; I guess it wasn't. The
2b || !2b
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
My favorite.
/world
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 9:20 PM +0100 7/5/07, Chris Boget wrote:
while( TRUE ) {
$actions++;
$words--;
}
$bets = array(1,2,3,4,5);
unset( $bets );
$arr = array( 'this', 'that', 'times' );
$arr[] = 'behind';
for( $i = 0; $i = 6; $i++ ) {
$deep++;
}
for( $i = 0; $i = 5; $i++ ) {
$flies--;
}
thnx,
Chris
To be.. or not to be?
On 7/5/07, tedd [EMAIL PROTECTED] wrote:
2b || !2b
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General
$chickens = 1000;
$roost = 0
$home = false;
while ($chickens != $roost)
{
$chickens--;
$roost++;
}
$home = true;
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
tedd wrote:
$chickens = 1000;
$roost = 0
$home = false;
while ($chickens != $roost)
{
$chickens--;
$roost++;
}
$home = true;
The chickens have come home to roost.
class Here
{
private $chickens;
}
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To
On Wed, 2007-07-04 at 10:18 -0400, tedd wrote:
$chickens = 1000;
$roost = 0
$home = false;
while ($chickens != $roost)
{
$chickens--;
$roost++;
}
$home = true;
When the chickens come home to roost.
Cheers,
Rob.
--
On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed
try,
try again'.
Here's another one...
?php
$x = rand( 1, 20 );
for( $i = 0; $i $x; $i++
On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed
try,
try again'.
Here's another one...
?php
On 7/3/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed
On 7/3/07, Daniel Brown [EMAIL PROTECTED] wrote:
On 7/3/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to
On Tue, 2007-07-03 at 10:36 -0400, Daniel Brown wrote:
A similar one:
?
function sing($ignore) {
echo It's a song!\n;
}
(float) $bus;
$bus = 14.750;
while($wheels = round($bus,2)) {
sing($wheels);
}
?
Well when you say it like that... you trigger my kid
On 7/3/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-07-03 at 10:36 -0400, Daniel Brown wrote:
A similar one:
?
function sing($ignore) {
echo It's a song!\n;
}
(float) $bus;
$bus = 14.750;
while($wheels = round($bus,2)) {
sing($wheels);
}
?
Well
[snip]
So I'll double-whammy it with a Name That Tune factor:
?php
class Thread {
var $wheel;
function Thread (){
$this-wheel = 'roun\'';
}
}
while($wheel = new Thread());
?
The wheel goes roun and roun [sic]
[/snip]
if($x == 0.01 || $x ==
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
One in a thousand ?
[/snip]
Nope.
Yes it is, you just don't know it yet. ;-P
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--
PHP General
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
So I'll double-whammy it with a Name That Tune factor:
?php
class Thread {
var $wheel;
function Thread (){
$this-wheel = 'roun\'';
}
}
while($wheel = new Thread());
?
The wheel goes
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
One in a thousand ?
[/snip]
Nope.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok, I'll play.
Phrase:
one = rand(1,100);
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Ok, I'll play.
Phrase:
one = rand(1,100);
[/snip]
One in a million. Still waiting to see if who gets the last one I
posted.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
[/snip]
Anyone?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 7/3/2007 12:11 PM, Jay Blanchard wrote:
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
[/snip]
In for a penny, in for a pound. Metric, that is!
Regards,
Paul
__
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
--
PHP General Mailing List
[snip]
At 7/3/2007 12:11 PM, Jay Blanchard wrote:
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
[/snip]
In for a penny, in for a pound. Metric, that is!
[/snip]
Correct!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
if($x == 0.01 || $x == 1.0){
$y = in;
}
[/snip]
Anyone?
Hint? ;)
Tijnema
--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
[snip]
In for a penny, in for a pound. Metric, that is!
Correct!
[/snip]
Another...(way easy)
$one = six;
$other = half-dozen;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
Another...(way easy)
Y'think? Heh.
$one = six;
$other = half-dozen;
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
03, 2007 3:13 PM
To: Jay Blanchard
Cc: Paul Novitski; php-general@lists.php.net
Subject: Re: [PHP] PHP Brain Teasers
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
Another...(way easy)
Y'think? Heh.
$one = six;
$other = half-dozen;
--
Daniel P. Brown
[office] (570
[snip]
if (goose($its))
{
$gander = $its;
}
[/snip]
What's good for the goose is good for the gander.
[snip]
for ($things = 1; $things 0; $things++)
{
for ($x = 0; $x $things; $x++)
{
$they = the same;
}
}
[/snip]
The more things change the more they stay the
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
if (goose($its))
{
$gander = $its;
}
[/snip]
What's good for the goose is good for the gander.
[snip]
for ($things = 1; $things 0; $things++)
{
for ($x = 0; $x $things; $x++)
{
$they = the same;
}
}
[/snip]
The
[snip]
Another...(way easy)
Y'think? Heh.
$one = six;
$other = half-dozen;
[/snip]
function esquireEliminate($x){
unset($x);
}
$lawyers = 10;
for($i = 0; $i $lawyers; $i++){
eliminateEsquire($i);
}
Shakespeare has his day in code!
--
PHP General Mailing List
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
Another...(way easy)
Y'think? Heh.
$one = six;
$other = half-dozen;
[/snip]
function esquireEliminate($x){
unset($x);
}
$lawyers = 10;
for($i = 0; $i $lawyers; $i++){
eliminateEsquire($i);
}
Shakespeare has
Daniel Brown wrote:
On 7/3/07, Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
Another...(way easy)
Y'think? Heh.
$one = six;
$other = half-dozen;
[/snip]
function esquireEliminate($x){
unset($x);
}
$lawyers = 10;
for($i = 0; $i $lawyers; $i++){
On Tue, 2007-07-03 at 18:09 -0400, Daniel Brown wrote:
The first thing we do, let's kill all the lawyers.
Let's wait a few more years, I like my soilent green fresh.
Cheers,
Rob.
--
..
| InterJinn Application Framework -
ok this one should be easy:
?
$animal = array (pig,cow,bat,chicken,dog);
for ($i = 0; $i sizeof($animal); $i++) {
$sighted = ($animal[$i] != bat ? see : blind);
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 6/29/07, clive [EMAIL PROTECTED] wrote:
ok this one should be easy:
?
$animal = array (pig,cow,bat,chicken,dog);
for ($i = 0; $i sizeof($animal); $i++) {
$sighted = ($animal[$i] != bat ? see : blind);
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Daniel Brown wrote:
What the hell? Why not start a thread that can be fun and
... here's a easy one:
interface Currency {}
interface Employee {}
class Peanut implements Currency {}
class Primate implements Employee {}
abstract class HeadHunter {
static function match(Currency $c) {
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
anywhere else yet, but I wouldn't be surprised if it has been. Let's
put together some names, phrases, and other stuff expressed as PHP
code and see who can come up with a
On 6/26/07, Daniel Brown [EMAIL PROTECTED] wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
anywhere else yet, but I wouldn't be surprised if it has been. Let's
put together some names, phrases, and other stuff
So here's the first one (it's simple):
?
function at($level) {
$level == 10 ? $ret = winner : '';
$level == 15 ? $ret = try : '';
$level == 20 ? $ret = first : '';
$level == 25 ? $ret = user : '';
$level == 30 ? $ret = place : '';
On 6/26/07, Tijnema [EMAIL PROTECTED] wrote:
On 6/26/07, Daniel Brown [EMAIL PROTECTED] wrote:
What the hell? Why not start a thread that can be fun and
challenging for all of us. It's something I haven't seen done
anywhere else yet, but I wouldn't be surprised if it has been. Let's
Jim, I didn't get any parse errors when I tested it, it just
output the stuff. You're right though that is what they say
Bah - thwarted (again) by PHP4. :(
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 6/26/07, Jim Moseby [EMAIL PROTECTED] wrote:
Jim, I didn't get any parse errors when I tested it, it just
output the stuff. You're right though that is what they say
Bah - thwarted (again) by PHP4. :(
How so? I didn't use any 5th Generation-specific code
--
Daniel Brown wrote:
On 6/26/07, Jim Moseby [EMAIL PROTECTED] wrote:
Jim, I didn't get any parse errors when I tested it, it just
output the stuff. You're right though that is what they say
Bah - thwarted (again) by PHP4. :(
How so? I didn't use any 5th
On 6/26/07, Jim Moseby [EMAIL PROTECTED] wrote:
Jim, I didn't get any parse errors when I tested it, it just
output the stuff. You're right though that is what
they say
Bah - thwarted (again) by PHP4. :(
How so? I didn't use any 5th Generation-specific
On 6/26/07, Jim Moseby [EMAIL PROTECTED] wrote:
On 6/26/07, Jim Moseby [EMAIL PROTECTED] wrote:
Jim, I didn't get any parse errors when I tested it, it just
output the stuff. You're right though that is what
they say
Bah - thwarted (again) by PHP4. :(
I think I have to answer to this one: 'If at first you don't succeed try,
try again'.
Eric
?
function at($level) {
$level == 10 ? $ret = winner : '';
$level == 15 ? $ret = try : '';
$level == 20 ? $ret = first : '';
$level == 25 ? $ret = user : '';
$level
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer to this one: 'If at first you don't succeed try,
try again'.
Here's another one...
?php
$x = rand( 1, 20 );
for( $i = 0; $i $x; $i++ );
while( --$i 0 );
?
Cheers,
Rob.
--
- Original Message -
From: Robert Cummings [EMAIL PROTECTED]
To: Eric Newberry [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Tuesday, June 26, 2007 5:14 PM
Subject: Re: [PHP] PHP Brain Teasers
On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
I think I have to answer
53 matches
Mail list logo