Since PHP 5.4 there is a short syntax for arrays.
One can write $arr = [1,2,3,4,5];
insted of $arr = array(1,2,3,4,5);
But if you have something like this:
class Test
{
/**
* brief description
* @var array $arr
*/
$arr = [ 0 => [ ... ], 2 => [ ... ] ];
}
then doxygen does not show an initializer line or only something like [ 0 => [ ... ]
.
By now I have a lot of code only using the short syntax and I don't want to change this for a documentation tool.
Is there any way to teach doxygen to use [...]
as array( ... )
? I'm using doxygen 1.8.7
Thanks in advance
EDIT :
I had an idea, that the problem could be a line break, if I write it like this
$arr = [ 0 => [ ... ],
2 => [ ... ] ];
I tested this, but no effect. But if I left out the first comma, it works fine (with and without the line break). But if I left out the comma, it is obviously a syntax error.
Any ideas how to fix this?