Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short arrays generation in var_export function #13326

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jorgsowa
Copy link
Contributor

@jorgsowa jorgsowa commented Feb 4, 2024

PoC for short ararys generation in var_export function.

I want to check whether this idea makes sense. If so then I can polish the PR and finish tests.

@jorgsowa jorgsowa marked this pull request as draft February 4, 2024 20:49
@jorgsowa jorgsowa changed the title Implement short arrays generation in var_export function Short arrays generation in var_export function Feb 4, 2024
@bukka
Copy link
Member

bukka commented Feb 4, 2024

This has been discussed before: https://externals.io/message/109415 . But looks like the RFC never got to a vote at least it looks like it from its status. I would personally prefer version with multiple flags as proposed by Sara.

@jorgsowa
Copy link
Contributor Author

jorgsowa commented Feb 4, 2024

@bukka thank you for this link. I wasn't aware of the existence of topic.

@Ayesh
Copy link
Member

Ayesh commented Feb 5, 2024

I'm afraid this might have a sour taste because the array() syntax is still valid, and as far as I see, we have not mentioned anything to encourage [] syntax over array().

I like that this PR does not change to [] syntax by default, and as Jakub mentioned, I'd love to have multiple flags as well. We are yet to recover from the setcookie parameter hell, so having multiple flag support from the beginning makes more sense.

As for BC, I wouldn't bother too much because PHP 5.4 is wayyyy too old for us to care about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants