Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
because, the second argument in the == operator is cast to the type of the first argument, hence (int)'sell' === 0 hence 0 == 0 gives true.
The right operand is converted to number, more details here
php.net/manual/ru/language.operators.comparison.php
And yet, for example, you cannot check the occurrence of a substring in a string using expressions like:
if (!strpos($haystack, $needle) {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question