It will give a fluctuating output from an AC input, switching at twice the AC frequency.
Ideally you need a load resistor across the input to the bridge rec, to bypass any leakage on the input connections while the input is open circuit - especially with higher voltages, capacitive coupling in a bundle of wires can cause significant voltages to appear on unloaded wiring.
In industrial-grade input circuits it's also common to have a series low voltage zener before the opto, so signals less than eg. 6V are not passed on at all, for better noise immunity.