Req #53978 [Fbk->NoF]: True multidimensional arrays
| From: | php-bugs at lists dot php dot net | Date: | Sun, 18 Jan 2015 04:22:19 +0000 |
| Subject: | Req #53978 [Fbk->NoF]: True multidimensional arrays | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190019@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53978&edit=1
ID: 53978
Updated by: php-bugs@lists.php.net
Reported by: gordon dot mcvey at ntlworld dot com
Summary: True multidimensional arrays
-Status: Feedback
+Status: No Feedback
Type: Feature/Change Request
Package: Arrays related
Operating System: all
PHP Version: Irrelevant
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2015-01-05 02:31:29] danack@php.net
Hi,
can you clarify your request? It may be best to show an implementation in userland PHP code of what
you think should be a part of the language, so that other people can clearly see what you want to
achieve.
------------------------------------------------------------------------
[2011-02-10 10:14:41] gordon dot mcvey at ntlworld dot com
Description:
------------
The current PHP arrays of arrays approach to handling complex structures is very powerful and
flexible, but it has some real limitations that require you to write workarounds that wouldn't
be necessary if PHP also supported true multidimensional arrays.
For example if you have an array of arrays that represents a piece of tabular data, and you need to
be able to sort the table on both of its axes, then you can only sort easily on one axis with one of
the array sorting functions. For the other, you have to foreach(0 over the array, then sort each
element in turn to achieve sorting on the opposite axis.
Additionally, you can only easily add or remove elements on one axis. Again, the other axis would
require a foreach.
Real multidimensional arrays would allow for more flexible processing of data that should be treated
as tabular and would be a worthwhile addition to PHP's array toolkit.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53978&edit=1