The WordPress version is much shorter. I wonder if this demonstrates it's good enough for most use cases, given WP is so widely used?
I'm curious to know if there are some important cases where someone would prefer to use the function OP shared instead.
https://core.trac.wordpress.org/browser/tags/6.1/src/wp-incl...