can some one tell me?
| SitePoint Sponsor |




can some one tell me?
It is one of the Comparison Operator, this one was introduced in PHP 4.
From manual:-
$a === $b | TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4)
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


$t=true;
$k=1;
if($t==$k) //same value everything except zero and false is true
echo 'true'; //outputs true
if($t===$k) //same type and value
echo 'true'; //outputs nothing




two semi colons means ?
This is called scope resolution operator used to access the static class members directly with it.
For more details:PHP Code:class Abc{
public static function myFunction(){
// do something
}
}
Abc::myFunction();
http://www.php.net/manual/en/languag...ekudotayim.php




Can you see there?
???PHP Code:........
public static function myFunction(){
..........
And better go through the details in the Page/Url i have posted above.
http://www.php.net/manual/en/languag...ekudotayim.php




Static method is a Class method.
First of all, I am not a good teacher to teach you. And I don't have much time to write all the lines myself so what i can do is just copy the lines from manual and paste it here.
So better try to read there in the manual itself. Dont be lazy to read more n more and do practice.
In c++ it is scope resolution operator
It is called same 'Scrop Resolution Operator' here in PHP as well. Do you mean it is said something else in PHP?
See the title of this page:
http://www.php.net/manual/en/languag...ekudotayim.php




Can you tell me ?
runrunforest, you really need to start reading the manual. It would be a lot quicker than posing the question here, then awaiting a possible reply to your post.
The really helpful guys/gals here love to help, but they're not here to copy and paste the manual for you.
Go on, delve into the manual, you may be surprised at the wealth of additional information there!![]()
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


How very polite SilverB!![]()
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!


I've tried. have you tried googling "::" or "==" or "__" ??
apparently not.
Google strips away :: or == or __, so you won't find any results from google.
Furthermore, inside the PHP manual, when you run a search for those specific things - they do not appear. I've tried. I've tried with and without quotes and every search returns no results.
So, without having the PHP manual memorized, I really don't know where to find what those are called, so I cant search the name of what they're called to read up on how they work and what they do.
So, instead of "google it", it would be helpful if someone who already knows where to find it in the manual would post a link to the appropriate section of the manual so we can read up on it.
It would help me. I'm sure it would help others too.
~ Nate L ~




Jesus. Dude you collected all my questions, you must want sell them for 10 buck when i died, don't you ?
Picaseu.
I am not flattering anyone but answers from here are more understandable and to the point. Besides Google just giving me links to topic like this, no real reply, I don't know why.






Just FYI...my post was merged in with multiple other threads started by the OP which I did not read. To all those explaining and posting links to the manual, I appreciate your efforts.
~ Nate L ~


Thank you. Google gave me this.
~ Nate L ~




__ is not an operator. All it is, is underscores. Maybe you saw them used as part of a symbol name(variable, function/method, constant). For example, the name of the class constructor method is named __construct() by convention.
here's some info on some of the symbol names php has used this naming convention for.
http://www.php.net/manual/en/languag...predefined.php
http://www.php.net/manual/en/language.oop5.magic.php
php warns it may apply "magical" functionality to symbols with this naming convention, so don't choose your own names like this. When they say magical, it means they do some stuff behind the scenes that you wouldn't expect given your otherwise correct knowledge of how php works. Like magic constants; they aren't really constants, and thier value changes throughout the script.




Thanks heap.
Bookmarks