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

php8: fixed concatenation precedence #31

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

i582
Copy link
Owner

@i582 i582 commented Jul 27, 2021

echo "sum: " . $a + $b;

PHP would previously interpret it like this:

echo ("sum: " . $a) + $b;

PHP 8 will make it so that it's interpreted like this:

echo "sum: " . ($a + $b);

Fixes #30

echo "sum: " . $a + $b;

// PHP would previously interpret it like this:
echo ("sum: " . $a) + $b;

// PHP 8 will make it so that it's interpreted like this:
echo "sum: " . ($a + $b);
@i582 i582 added the PHP 8 PHP 8 features label Jul 27, 2021
@i582 i582 merged commit fa09cc9 into php8_dev Jul 27, 2021
@i582 i582 deleted the pmakhnev/fix_precedence_of_concat branch July 27, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP 8 PHP 8 features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant