Live data from Hacker News

US State Names and Abbreviations as PHP Arrays

gist.github.com

1–10 of 16 posts

Re: US State Names and Abbreviations as PHP Arrays

#5
I'm surprised PHP doesn't already have US_state_name_to_abbreviation() and US_state_abbreviation_to_name() baked in already. This is a language that supports[0] Swatch Internet time[1]. Literally, a "time" format made up as a gimmick to advertise one specific brand of wristwatch from the late 1990s.

I hope someone on Hacker News who contributes to the PHP core can attempt to correct this discrepancy.

[0]http://www.php.net/manual/en/function.idate.php

[1]https://en.wikipedia.org/wiki/Swatch_Internet_Time

Re: US State Names and Abbreviations as PHP Arrays

#9
post #5

I'm surprised PHP doesn't already have US_state_name_to_abbreviation() and US_state_abbreviation_to_name() baked in already. This is a language that supports[0] Swatch Internet time[1]. Literally, a "time" format made up as a gimmick to advertise one specific brand of wristwatch from the late 1990s. I hope someone on Hacker News who contributes to the PHP core can attempt to correct this discrepancy. [0] http://www.p…

I suspect it would be US_state_name_to_abbreviation() and USStateAbbr2Name() in order to meet PHP's consistency requirements.

Re: US State Names and Abbreviations as PHP Arrays

#10

Completely lost it at _temp.php, evals, temporary variable names... I'm getting flashbacks.

file_get_contents should make an http request to its own server for maximum awesomeness...

assuming the php file just echoes its own source code,which is entirely doable.

Post reply on HN