The reason that the exception message was thrown in the case presented by QA team is when "superman" term came at the start of string, strpos gives 0
bcoz it founded it at the start position, hence given 0
to the if
condition with ! (not)
operator makes it true
.
Solution:
<?php