Skip to content

Comment on Underscore.phpparent

Comments

Also, the double underscore prefix is reserved for magic methods:

    PHP reserves all function names starting with __ as magical. It is
    recommended that you do not use function names with __ in PHP unless you
    want some documented magic functionality.
It's only explicitly reserved for functions, so you're technically ok here, but it still may cause confusion.

http://www.php.net/manual/en/language.oop5.magic.php

It was a bit of pick your poison between a gettext() alias collision, ugly namespace syntax, and potential confusion with magic methods. Hopefully too many people aren't confused.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.