Lets say you have a line like this:

Code:
$index = strpos($sometext, '$', 2);

but the $sometext is empty. Then the offsett 2 will be outside and PHP will send a warning.


What do you usualy do with this. First do an if test to check if the string is long enough? Or do you just use the @ to suppress the warning? Or is that an ugly "hack"???


- ØØ -