3 ms·
At first I thought this article might be about array programming languages[1], but then I remembered today's date. If I understand correctly, this "technique" r
by RodgerTheGreat 15y ago
At first I thought this article might be about array programming languages[1], but then I remembered today's date. If I understand correctly, this "technique" relies on the fact that PHP "arrays" are associative structures that might be called a map in conventional terminology- wouldn't "Map-oriented programming" make more sense?
[1] http://en.wikipedia.org/wiki/Array_programming_language http://en.wikipedia.org/wiki/Array_programming_language
- courtewing 15y agoYou are correct. PHP arrays are actually just ordered maps, so "map-oriented programming" would be appropriate in PHP. However, there is no traditional array implementation in PHP, so calling it "map-oriented programming" within the context of PHP would be ambiguous. That all said, this "technique" could be used with a traditional array, in theory. The array in the example is fixed-length, and the keys themselves aren't really used at all.