note 125803 added to language.types.null
| From: | Mojo@php.net | Date: | Wed, 10 Feb 2021 10:18:28 +0000 |
| Subject: | note 125803 added to language.types.null | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219218@lists.php.net to get a copy of this message | ||
Pay attention then using operator -- on NULL values:
$x = null;
--$x; // $x is NULL
$x--; // still NULL
$x -= 1; // $x is -1
On other side for ++ everything works fine:
$x = null;
++$x; // $ix is 1
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.166 (proxied: 91.148.50.148)
----
Manual Page -- http://php.net/manual/en/language.types.null.php
Edit -- https://master.php.net/note/edit/125803
Del: integrated -- https://master.php.net/note/delete/125803/integrated
Del: useless -- https://master.php.net/note/delete/125803/useless
Del: bad code -- https://master.php.net/note/delete/125803/bad+code
Del: spam -- https://master.php.net/note/delete/125803/spam
Del: non-english -- https://master.php.net/note/delete/125803/non-english
Del: in docs -- https://master.php.net/note/delete/125803/in+docs
Del: other reasons-- https://master.php.net/note/delete/125803
Reject -- https://master.php.net/note/reject/125803
Search -- https://master.php.net/manage/user-notes.php