string - What's the difference between 'eq' vs '==' in PHP? -
First of all, I searched the various forms of the titles I have kept for this question in Stack Overflow and Google I tried not to get the solution.
I'm quite new to php; New enough to not know the difference between using eq
and ==
for string comparison!
I usually use ==
to compare wire in PHP I am comfortable with it.
But I've seen the code using eq
to compare strings. And I'm missing something like 'Oh! I used ==
to compare strings. I should have used the eq
'
I just want to know whether using ==
is ok to compare simple string is? I am not talking about any fancy type of special cases, case-sensitive, substring or string comparison. Just checking whether apple
is like apple
.
What is ==
enough? Or should I use the eq
.
Edit:
My mistake :( Thank you very much for cleansing my 'nonsense research' that it should have been in Pearl. I was confused about seeing the embedded code within HTML and I thought it was a different way of embeding PHP. Sorry.
eq
operator for the similarity, while < Code> = = Numerical test for equality. Although PHP started once as a collection of Perl scripts, I do not think they The operator has copied and seems to agree.
Comments
Post a Comment