PHP - 使用PHP验证表单可以保证完整的验证,无论客户端使用什么浏览器?

I have a relatively simple question.

Will using PHP guarantee that a form is always validated in the manner that was coded using PHP?

This being... If you do something like:

if (strlen($_POST['myInput'] == 0)
{
    Do this...
}

Will it apply no matter what client the user is making use of? E.g. IE, Firefox, Mobile Devices (Blackberry, Samsung), Linux Browsers?

The reason I ask this is because I fail to see the point in applying html validations like pattern at all.

Any input regarding this would be greatly appreciated. Thank you!

EDIT:

if (!preg_match("#^([0-9 ]{10,13})?$#", $_POST['myInput']))
{
    // Apply error pointers
    $_SESSION['myInputError'] = 'class="badInput" autofocus="autofocus"';

    include "$docRoot/html/forms/reg/user_info.html.php";
    exit();
}

The answer is yes, PHP is run by the server and not the client, therefor it will treat the input the same way always. So unless you make a specific code to make it act diffidently depending on the client's browser, it'll treat the input the same way.

Validation on the server side should guarantee that the form is always validated. So if you only have time to develop one, pick server-side validation.

That said, client-side validation is useful because each form field individually can be validated in real-time as the user fills it out, so they can tell much more quickly whether they've filled it out correctly.