4. Quadrilateral $ABCD$ is inscribed in a circle, $BC=CD=4$, $AC$ and $BD$ intersect at $E$, $AE=6$, and the lengths of $BE$ and $DE$ are both integers. Then the length of $BD$ is $\qquad$
4.7.

From $\overparen{B C}=\overparen{C D}, \angle B D C=\angle C A D, \angle A C D=\angle A C D$, we know $\triangle D C E \backsim \triangle A C D$, so $\frac{C E}{C D}=\frac{C D}{A C}$, which means $C E \cdot A C=C D^{2}$. Therefore, $C E(C E+6)=16$, solving this gives $C E=2$. Also, from $B E \cdot D E=A E \cdot C E=12$, and $B E+C E>B C$, then $B E>$ 2. Similarly, $D E>2$. Since $B E$ and $D E$ are integers, then $B E=3, D E=4$ (or $B E=4, D E=3$). Hence, $B D=B E+D E=7$.