Saved pastes by tomkyle+codepad@posteo.de:
1 2 3 4 5
<?php function tofloat($num) { $dotPos = strrpos($num, '.'); $commaPos = strrpos($num, ','); $sep = (($dotPos > $commaPos) && $dotPos) ? $dotPos :