i am trying to convert this javascript code to php code but not working : i want to convert this javascript code to php code 

function testPattern(iString) {

var iPattern = /[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Zz1-9A-Ja-j]{1}[0-9a-zA-Z]{1}/;

    var patt = new RegExp(iPattern),
    isPatternValid = patt.test(iString);
    return isPatternValid;
}

i tried this php code but not working 

function testPattern($iString) {

   $iPattern ="/[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Zz1-9A-Ja-j]{1}[0-9a-zA-Z]{1}/";

   $isPatternValid = preg_match($ipattern, $istring);

    return $isPatternValid;

}