On 2005-06-17 08:08, kicken wrote:
Actually, that's the main difference between print and echo. Print CAN
be used in expressions while echo can't. Print does have a return value
, and behaves like a normal function, despite it not actually being one.
See the last paragraph in the manual, which links to this faq:
http://www.faqts.com/knowledge_base/...l/aid/1/fid/40
Yes, I am aware of the difference between print and echo, that is why I
used print in my example.
In response to the OP, the code works just fine for me. It prints out
"foobar".
Very interesting. I have tried the same script on several web servers
now, with the following results:
[SuSE 9.2, Apache/2.0.50]
This is localhost, running PHP 4.3.8
foobar
[SuSE 9.2, Apache/2.0.50]
This is localhost, running PHP 5.0.4
foobar
[Debian Sarge, Apache/2.0.53]
This is
www.foo.at, running PHP 5.0.4
foobar
[Debian Sarge, Apache/1.3.33]
This is akira.foomatic.at, running PHP 5.0.4
foo
Huh.
The only interesting difference that I can see is that the last server
is running Apache 1 instead of Apache 2.
cheers,
stefan