-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Move locale sniffing to dump() time #23574
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
Conversation
nicolas-grekas
commented
Jul 18, 2017
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #23572 |
License | MIT |
Doc PR | - |
@@ -121,6 +119,9 @@ public function setIndentPad($pad) | |||
*/ | |||
public function dump(Data $data, $output = null) | |||
{ | |||
$this->decimalPoint = strval(0.5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry fabbot, but I really want strval here, to prevent any optim by opcache :)
2605cf0
to
f77161b
Compare
f77161b
to
7f6e0da
Compare
7f6e0da
to
eed8a51
Compare
$this->decimalPoint = (string) 0.5; | ||
$this->decimalPoint = $this->decimalPoint[1]; | ||
$this->decimalPoint = localeconv(); | ||
$this->decimalPoint = $this->decimalPoint['decimal_point']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keep the logic here as well? Can't we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For BC, the property is protected.
Thank you @nicolas-grekas. |
…rekas) This PR was merged into the 2.7 branch. Discussion ---------- [VarDumper] Move locale sniffing to dump() time | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23572 | License | MIT | Doc PR | - Commits ------- eed8a51 [VarDumper] Move locale sniffing to dump() time