Because of the 1N4007, both the PC817 and the H11AA1 will behave the same.
Remove the diode and use the H11AA1 if you only want to detect zero crossing, leave it and (preferably) use PC817 if you want to detect both zero crossing (on rising and falling edges of the opto output) and polarity.