PHP 4.0 Bug #7888: decrement syntax should be -- instead of -

From: Date: Mon, 20 Nov 2000 11:17:13 +0000
Subject: PHP 4.0 Bug #7888: decrement syntax should be -- instead of -
Groups: php.dev 
Request: Send a blank email to php-dev+get-38566@lists.php.net to get a copy of this message
From: jgoulooze@thinktoo.nl Operating system: NT & win98 using apache (phptriad) PHP version: 4.0.2 PHP Bug Type: Documentation problem Bug description: decrement syntax should be -- instead of - The documentation says $a= 5; -$a; echo $a; theresult: 4 $a= 5; $a-; echo $a theresult: 4 In reality however both report an error Instead it should be: $a--; --$a; Which makes more sense to me since it is also ++$a and $a++. Is this just the winversion, has it to do with phptriad or is this a mistake in the documentation? Since I probably end up serving the pages on Linux and building it on Wintel it could be quite a problem. Jeroen Goulooze -- Edit Bug report at: http://bugs.php.net/?id=7888&edit=1

« previous php.dev (#38566) next »