I added a blank space to the hayStack for strpos, and that seems to do the trick.
It works because you're implicitly casting it as a string; instead, you could just explicitly cast it:
PHP Code:
$numPos1 strpos((string)$hayStack,  (string)$num1YXX); 
This makes the intention of your code a little more straightforward.