Hi,
What is diff. between . VS &?
Also how to use:
php_smtp.dll
php_pop3.dll
Printable View
Hi,
What is diff. between . VS &?
Also how to use:
php_smtp.dll
php_pop3.dll
I've been a VB6 coder for a long time and I'm used to using & for concactenating stuff together. In fact less than an hour ago, in PHP, I had typed.Quote:
$binary = $binary & ' ' & $si;
This didn't work like I thought it would. So I retyped it asI'm not sure I've ever used & anywhere in PHP.Quote:
$binay = $binary.' '.$si;
Use the period (.) to concatenate
PHP Code:$stringa = 'dclamp';
$stringb = 'likes pizza!';
$stringc = $stringa . ' ' . $stringb;
echo $stringc;
// Prints: "dclamp likes pizza!"
Those 2 dll files are used for POP3 and SMTP. You really dont need to mess with the dll files unless you are installing them.
EDITED:
ignorance.
The & symbol is the reference operator in C-based grammars. Before PHP 5 we needed to use it in order to get a reference to an object; in PHP 5 objects have reference semantics by default. Now it's mainly only used in function declarations:
and enumeration:PHP Code:function passbyref(&$thing)
{
# this will modify the variable, or the reference in the variable, passed in:
$thing = newthing();
}
PHP Code:foreach ($array as &$val)
{
# this will modify the element in the array:
$val = newval();
}
It is also the binary bitwise AND operator:
Code:$a = 1 & 0; // $a = 0
Thanks to all. Resolved ;).