PHA biosynthesis, recovery, and application