This website requires JavaScript.
Explore
Help
Register
Sign in
Jones
/
MastodonHelp
Watch
1
Star
0
Fork
You've already forked MastodonHelp
0
Code
Issues
Pull requests
Releases
Wiki
Activity
77d8ab3063
MastodonHelp
/
web
/
lib
/
realfloat.php
6 lines
71 B
PHP
Raw
Normal View
History
Unescape
Escape
A workaround to php 7.3 echoing floats with “,” instead of “.” as a decimal separator; first commit
2023-12-28 14:50:26 +01:00
<
?
php
function
rf
(
$num
)
{
Using preg_replace instead of str_replace to substitute all non-digit characters
2023-12-29 10:00:12 +01:00
return
preg_replace
(
'#\D#u'
,
'.'
,
$num
);
A workaround to php 7.3 echoing floats with “,” instead of “.” as a decimal separator; first commit
2023-12-28 14:50:26 +01:00
}
?>
Reference in a new issue
Copy permalink