Repository navigation
Conversation
|
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. |
@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: |
e468c25 to
4fedde6
Compare
|
This made it into 8.6, so the target branch should be PHP-8.6. You may do the fixes in this PR. |
4fedde6 to
b31b3bc
Compare
|
Commit rebased on branch |
@LamentXU123 Sorry, I do not get the point. Please tell again. The line itself is not unrelated, as this change doubles the string now. |
|
Oh I see. My bad, was a bit sick today. I mixed up the diff from another PR |
* PHP-8.6: Fix test to use non-interned string (#25370)
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.