do duty for

[do duty for] {v. phr.} To substitute for; act in place of.

The bench often does duty for a table.