English: Greek Xiphos Italiano: Spada oplitica tipo xiphos (Photo credit: Wikipedia)
The Phalanx formation, as I have said in previous posts, was very effective and almost impossible to get into from the front (where all those spears are pointed), but if the Hoplites are flanked (meaning the enemy is able to get behind them), the Phalanx formation is useless, and the hoplites would be unable to turn around and point the super long, cumbersome spears at the enemy in time, so the only thing to do is throw the spear at whoever you have time to throw at, and pull out your Xiphos.
The Xiphos was a short sword designed for close combat. I mean, reeeally close combat and a reeaally short sword; some swords were only 30 centimeters long, though the average was one and a half feet long. The sword was made so that just after the hand guard, it was fairly thin, then gradually widened out and suddenly curved in to the point, though not so quickly that it would be inefficient to stab with. This design put most of the weight towards the front of the blade, enabling for a powerful swing in a small area of swinging, which is perfect for the close hand-to-hand fighting that would incur if the Phalanx was flanked.
What is really surprising about the Xiphos is that Bronze was so hard, it would take a long time to forge it into a sword, so it was cast. Casting metal considerably hardens it when it is cool, and so the cast sword would be very brittle. The sword would be very thick though, and so this would cancel out the “britality” of the sword, yet it would still be hard, decreasing the chance of the edge being dented. When iron became available in commercial quantities, then the swords were forged, as it would take a lot of work to melt iron and pour it, and iron is a lot softer than bronze, making it easier to forge.