Because the documentation says
int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
you would think that ENT_HTML401 is important. But as the notes mention, ENT_HTML401 is the default if you don't specify the doc type. This is because ENT_HTML401 === 0. So
int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
is exactly equivalent to
int $flags = ENT_QUOTES | ENT_SUBSTITUTE