With an equal amount of production, a civilization that has to split its early fighting force between spears and axes is going to get smashed against a pure Greek phalanx army. The advantage for the Greeks is not in the individual unit, but that they don't have to worry about chariots early game, and so can produce more melee anti-melee units than any other civ who has to produce some melee anti-mounted. It's a big picture advantage, not an individual unit advantage.
<snip>...say you have two roughly equal stacks, a Greek army and some other army fighting. The Greek army is mostly phalanxes and a few chariots. The other army is a mixture of axemen, spearmen, and chariots.
The Greeks can simply attack from the start with phalanxes and fight on equal terms: the only difference will be the training of the phalanx vs. the axes. If the Greeks attack with chariots, the spears will slaughter them. If any axes or chariots break off from the other army's main force, either the chariots or phalanxes will slaughter them (both battles go to the Greeks). Now, look at the other army: if they try to attack with spears to kill the chariots, the phalanxes win. If they try to attack with chariots to beat up the phalanxes...it still doesn't work, although it is not as bad of a slaughter. If they attack with the axes, its a fair fight.
Where this gets interesting is after the losses start to pile up. If the other army loses "axe strength", the spears and chariots become vulnerable to phalanx attacks, and get slaughtered. Now, the Greek chariots come in and mop up the remainder of the other army's axes. If the phalanxes start to take some losses, however, such a vulnerability does not open up--all the Greek troops can fight against the melee axes (no spearmen) and hold their own against the chariots if not damaged. With an equal amount of production and thus nearly equal numbers, the phalanxes will trump, but not without a fair fight to start.