note 106473 deleted from control-structures.alternative-syntax by danbrown

From: Date: Fri, 11 Nov 2011 19:31:54 +0000
Subject: note 106473 deleted from control-structures.alternative-syntax by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-184401@lists.php.net to get a copy of this message
Note Submitter: whitney.a.beck at gmail dot com ---- @temec987 at gmail dot com "This does not work with echo() for some reason. I find this extremely useful!" As I understand it is because echo is a special language construct that does not return a value. This is one of the critical distinctions between echo and print. Print, unlike echo, always returns 1. I can't say that this is the reason why echo cannot be chained with booleans the way you described, as the real reason likely lies in the internal implementation details of echo and print. To make your example work: 1 === 1 AND print "one equals one";

« previous php.notes (#184401) next »