After the basic PHP operators, the following again, the PHP novice frequently encountered problems, and, and:: What are these three guys are what the difference is what the AH! look very faint.
Okay, here's a detailed explanation, if you have a c++,perl base, you'll find that these guys and some of their symbolic functions are similar.
The '-> ' symbol is the ' pluggable dereference operator ' (infix dereference operator). In other words, it is a method of calling a subroutine that passes arguments by reference (and, of course, other functions). As we mentioned above, most of the parameters are passed by reference when invoking PHP's functions. The '-and ' features in PHP are the same as they are in Perl or C + +. Here is an example of a simple solution reference:
echo $x->def (); # output
The ' = = ' operator is common in PHP scripts. Because the PHP array functions are very rich, we often use arrays because it is convenient to manipulate the data.
$phparr = new Array (in = = ' reply, '
Side = ' Left ',
PADX = 2m,
Pady = 2m,
IPADX = 2m,
Ipady = 1m
)
By the way, if you need to use the number "greater than equals" symbol, you should use ">=" instead of "=".
In PHP "::" This is called the scope resolution operator, aka domain operator
The "::" symbol can be thought of as "." In the C language. Similar, and it is more like C + + (Perl):: Class-scoped operators.
PHP calls the internal static members of a class, or calls between classes using:
Here is an example:
class A
{
static $count = 0;
static function haha ()
{
//
}
function Diaoyoug ()
{
Self::haha ();
Self:: $count;
}
}
A.B.C; /* * in the C language
A::b::c (); Functions in C + +
$a:: b::c; # Scalar in Perl 5
What do you mean by symbols------and::