Neither are good.
A petrol car will work if a fuel tank is partly topped up with diesel. It will run, but smoke like mad. Damage is unlikely. If the concentration of diesel is high the engine won't run as the fuel won't ignite.
Trying to run a diesel on petrol will almost certainly cause damage. The fuel will detonate as opposed to burn properly and the solvent effect of petrol will strip lubricating film from the bores and damage seals.

