Catalyzes the non-oxidative deamination of L-phenylalanine and L-tyrosine to form trans-cinnamic acid and p-coumaric acid respectively with similar efficiencies. Facilitates the commitment step in phenylpropanoid pathways that produce lignins, coumarins and flavonoids. L-phenylalanine = (E)-cinnamate + NH4(+) L-tyrosine = (E)-4-coumarate + NH4(+) kcat is 10.6 sec(-1) with L-phenylalanine as substrate and 0.92 sec(-1) with L-tyrosine as substrate (at pH 8.7). Optimum pH is 8.0-8.5. Optimum temperature is 55-60 degrees Celsius. Phenylpropanoid metabolism; trans-cinnamate biosynthesis; trans-cinnamate from L-phenylalanine: step 1/1. Belongs to the PAL/histidase family.