Unless your opponent also has phalanxes, then the square phalanx beats the wide phalanx especially if there is a quality difference between phalanx of the square and the line formation.