Skip to content

🐛 Adding php56 compatibility #56

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

Merged
merged 1 commit into from
Jan 3, 2024
Merged

🐛 Adding php56 compatibility #56

merged 1 commit into from
Jan 3, 2024

Conversation

macoaure
Copy link
Contributor

@macoaure macoaure commented Jan 3, 2024

The short syntax for the 'list' function was introduced in PHP 7.1. Prior to this version, 'list' was used as a regular function. Our Magento 1.5 projects are currently running on PHP 5.6, which does not support the short syntax. This has resulted in the following error:

<?php

// works
list($a, $b) = [
    'a',
    'b'
];

// dont work
[$a, $b] = [
    'a',
    'b'
];

// Parse error: syntax error, unexpected '=' in /.../test.php on line 10

@colinmollenhour colinmollenhour merged commit c2e6ed1 into colinmollenhour:master Jan 3, 2024
@colinmollenhour
Copy link
Owner

Thanks for the PR. PHP 5.6 support is not really a goal but I'll try to keep this in mind.

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

Successfully merging this pull request may close these issues.

2 participants