Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Export PHP array new syntax

justrusty's profile image justrusty posted 3 months 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 2 months 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 2 months 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.

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
Wiikend's profile image Wiikend posted 2 months 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 2 months 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 1 month 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 3 weeks 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.