echo VS print : that's a cool behavior !
| From: | Julien Pauli | Date: | Tue, 23 Oct 2007 15:34:47 +0000 |
| Subject: | echo VS print : that's a cool behavior ! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-263543@lists.php.net to get a copy of this message | ||
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 someone explain it ?
( the result is : toctoc hihi u 1pupu zozo 1v 1tata 1coucou 1 )