Strpos failing to output FALSE!

It is said on the following link:
Using the strpos() function
The strpos() function is used to search for a string or character within a string.

If a match is found in the string, this function will return the position of the first match. If no match is found, it will return FALSE.

Isn’t the following supposed to output to screen “FALSE” ? I do not see this happening.

   <?php
      echo strpos("Hello world!","s");
    ?>

Try using var_dump() on the result.

Once someone showed me how to use var_dump() but now I have forgotten it as I read no tutorial on that.
Know of a good link ?
How-about you check what is wrong and then show me your result aswell as how you did the test ? Would be good learning curve for me.

http://php.net/manual/en/function.var-dump.php

Edit:

Have a look at the solution to this topic and especially note the four error statements at the top of the page.

1 Like

Thanks Betong!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.