Repository navigation
Conversation
Member
|
Wrong commit pointed, str_repeat got optimized such that passing 1 returns the input string, that's the root cause not the ext/random changes. |
Author
@ndossche That one fixes it. Do you add a new PR or shall I?
This alternative actually works to create non-interned strings: $strInterned = "my valid";
$strNonInterned = $strInterned . " string";Also see: |
rr-it
force-pushed
the
fix/testcase-non-interned-string
branch
2 times, most recently
from
November 10, 2026 14:22
e468c25 to
4fedde6
Compare
Member
|
This made it into 8.6, so the target branch should be PHP-8.6. You may do the fixes in this PR. |
rr-it
force-pushed
the
fix/testcase-non-interned-string
branch
from
November 10, 2026 19:14
4fedde6 to
b31b3bc
Compare
Author
|
Commit rebased on branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the test-case to actually use a non-interned string.
This construct actually becomes an interned string after optimizations applied in 93fd714:
php-src/ext/standard/string.c
Lines 5641 to 5643 in 93fd714
Further
random_int(1, 1)is optimized since PHP 7:php-src/ext/standard/random.c
Lines 171 to 173 in c12917a
Implemented with c12917a and further refactored with b14dd85 and 4d8dd8d.