[PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Julien Pauli
Hello everyone. We all know the difference between print and echo, but has someone ever tried to combine them together ?? Right, try this : ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); And guess the result ... Can

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the way it does? First off, print() is a function so nesting

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread tedd
At 11:46 AM -0400 10/23/07, Robert Cummings wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the way it

RE: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Instruct ICC
Hello everyone. We all know the difference between print and echo, but has someone ever tried to combine them together ?? Right, try this : ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); And guess the

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 11:54 -0400, Andrew Ballard wrote: On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: My bad, print is not a function, and so: print( 'toctoc ' ).'hihi '; is equivalent to: print( 'tocktoc '.'hihi ' ); Ah. I see. I knew they were optional, but I didn't know that when you include them PHP evaluates ('toctoc')

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Julien Pauli
That's just the case : too see what happens if I agree that anyone will never meet such a case in everydays' programming. ;-) 2007/10/23, Andrew Ballard [EMAIL PROTECTED]: On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: My bad, print is not a function, and so: print(