<?php

$pattern = '/^[0-9]{2}$/';
$input = '00';
if (preg_match($pattern, $input, $matches)){
    echo 'Đây số có 2 chữ số';
}