Re: Looking for an explanation

From: Date: Tue, 20 Jun 2006 23:21:54 +0000
Subject: Re: Looking for an explanation
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24166@lists.php.net to get a copy of this message
print ($life = "hard") -1; Store "hard" in $life,
Substract 1 from the result of that assignment ("hard") "hard", when used in a string context is casted to int (0) 0 - 1 == -1 Output result of subtraction (casted to string): "-1"
print "\nlife: {$life}\n"; Concatenate "\nlife: " with contents of $life ("hard") and concatenate that with "\n"
Output the result of concatenation -Sara

« previous php.internals (#24166) next »