Export PHP array new syntax

justrusty's profile image justrusty posted 4 years ago in Import/Export Permalink

Currently when exporting a php array it's using the pre 5.6 syntax array()

Is it possible to use the newer square bracket syntax? i.e. []

Thanks

Wiikend's profile image Wiikend posted 4 years ago Permalink

The problem with replacing array() with [] is that you suddenly don't support users on PHP < 5.4 (not that anyone should be using this version still, but I promise you that many legacy applications are still on this version or below). This switch would exclude these users from using HeidiSQL, for... almost no benefit at all.

justrusty's profile image justrusty posted 4 years ago Permalink

Obviously I understand that. Would it be so bad to have an option for which syntax to use? I wasn't talking about alienating users completely.

Wiikend's profile image Wiikend posted 4 years ago Permalink

I don't know why I assumed you wanted to permanently change this behaviour for everyone, sorry about that. an option would be nice, as I also like the neat [] syntax better.

ecxod's profile image ecxod posted 4 years ago Permalink

Obviously I understand that. Would it be so bad to have an option for which syntax to use? I wasn't talking about alienating users completely.

array() is not depreciated. right?

Wiikend's profile image Wiikend posted 4 years ago Permalink

I'm going to assume you meant deprecated, as depreciated means that it's lost value over time (which I very much think it has, though).

array() is not deprecated, I hope I didn't confuse you. My point was that if we were to switch from array() syntax to [] only, we would exclude all users of < PHP 5.4 because [] did not exist before PHP 5.4. However, it was based on a silly assumption I made that the array() syntax would be removed in favor of [].

Sorry for the confusion.

ecxod's profile image ecxod posted 4 years ago Permalink

(thank you for the English lesson :o) ) yes I think we can close this, there are other problems that are much more important, A lot of things not implemented yet, other buggy, and this is just a "vogelschiss" :))

have fun christian

Please login to leave a reply, or register at first.