$filename = \'my_upgrade(1).zip\'; $match = \'my_upgrade\'; if(!strpos($filename, $match)) { die(); } else { //proceed }
In
strpos in this case will return a zero, which is then interpretted as false when you do the logical negation. You should check explicitly for the boolean false.
false