note 10844 added to Expressions
| From: | mircho at _NO_SPAM_abv dot bg | Date: | Tue, 23 Jan 2001 17:23:14 +0000 |
| Subject: | note 10844 added to Expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-10184@lists.php.net to get a copy of this message | ||
try this
$a = "-1";
$a++;
echo $a;
this prints -2 as a result
to be sure you get what you wanted to get just do this
$a = "-2"
$b = (integer)($a)
and now $b will behave
somebody mentioning strict typing?
http://www.php.net/manual/en/language.expressions.php