3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $digit = '€ 2 500. 00'; $digit = preg_replace('/(\s|[^0-9\.,]+)+/', '', $digit); var_dump($digit);
based on v5UpQ
Output for 5.5.0 - 7.3.0rc4
string(7) "2500.00"