ext/phar: Readability Improvements in phar_fancy_stat()#21865
ext/phar: Readability Improvements in phar_fancy_stat()#21865TimWolla merged 1 commit intophp:masterfrom
Conversation
|
I would say yes even though the benefit is really more the readability improvement more than "saving strlen calls", nowadays strlen(str)/sizeof(str)-1 the former still use __builtin_strlen behind the scene with compile time strings like here. |
|
Test failures are unrelated :/ |
TimWolla
left a comment
There was a problem hiding this comment.
I agree with David's comment. Can you adjust the commit message and PR title accordingly?
|
Can you rebase the PR on master now that CI should be fixed. |
Ah the CI is fixed now :) |
|
Please rebase and force push rather than merging master, this adds random commits that make it hard to review. |
|
Ah ok now it works. Its late night last time and I'm kind of stupid that I forgot to check it.. Anyway, now its clean :) |
This patch removes the temporary key array and uses
ZEND_STRL(...)directly for each fixed key instead. This avoid repeated strlen() calls and also reduce code complexity.