On photoelectrocatalysis of hydrogen and oxygen evolution