Search code examples
phpconstants

what does PHP's ERA constant mean?


PHP has had the "ERA=131116" constant since at least PHP 4.3.0 (probably longer): https://3v4l.org/XYZZ1

but what does it mean? what is it used for? get_defined_constants($categorize = true); puts it under the "standard" category, which doesn't help me much, and googling it doesn't seem to turn up anything useful, and the only documented constant i can find which sort-of looks similar is IntlCalendar::FIELD_ERA, which is a 0 (a far cry from 131116, I guess it is not related)


Solution

  • At https://www.php.net/manual/en/function.nl-langinfo.php

    we can see ERA being specified as "Alternate era."

    enter image description here

    I have never used this field, but according to https://www.w3schools.com/php/func_string_nl_langinfo.asp

    it can be a parameter to nl_langinfo, specifying what element needs to be returned.