improve isValidPHPCode