The following poem is often cited as a 5-7-5 example, but it's actually a tanka (5-7-5-7-7):
In the garden of my dreams
Lilies bloom beneath the moon
Fragrant petals lift to greet
Twilight stars that touch my soul
Nature's magic sets me free
True haiku consists of only three lines (5-7-5). A classic example:
Old pond—
a frog jumps in—
sound of water
Both forms capture a moment, but tanka allows a deeper emotional turn in the final two lines.