note 83299 added to language.operators.string
| From: | mehea at osu1 dot php dot net | Date: | Tue, 20 May 2008 00:31:26 +0000 |
| Subject: | note 83299 added to language.operators.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139543@lists.php.net to get a copy of this message | ||
I thought string operators were for use with strings or strings and numbers. But that is incorrect.
You can use the '.' operator to concatenate two numbers, as follows:
echo 1 . 2;
I assume that behind the scenes the 1 and 2 are converted to strings to allow the concatenation.
What triggers the conversion? I'll guess the dot operator.
----
Server IP: 69.147.83.197
Probable Submitter: 216.244.36.15
----
Manual Page -- http://www.php.net/manual/en/language.operators.string.php
Edit -- https://master.php.net/note/edit/83299
Del: integrated -- https://master.php.net/note/delete/83299/integrated
Del: useless -- https://master.php.net/note/delete/83299/useless
Del: bad code -- https://master.php.net/note/delete/83299/bad+code
Del: spam -- https://master.php.net/note/delete/83299/spam
Del: non-english -- https://master.php.net/note/delete/83299/non-english
Del: in docs -- https://master.php.net/note/delete/83299/in+docs
Del: other reasons-- https://master.php.net/note/delete/83299
Reject -- https://master.php.net/note/reject/83299
Search -- https://master.php.net/manage/user-notes.php