there’s no place like code

echo is diffe­rent state­ment, than print

Originally posted at saji-codes tumblr.

true && echo 'ok';

fails with

Parse error: syntax error, unexpected T_ECHO in /home/saji/foo.php on line 2


true && print 'ok';

works just fine


echo echo 'ok';

also fails. It seems that things has changed in php-5.3 and echo does not return true anymore. Weird that print does, thought.