- var_dump: documentation ( source)
- sscanf: documentation ( source)
<?php
$tests = [
'Paid a bill £0.90',
'Paid a bill £100',
'Paid a bill £100.10',
'Paid a bill £1000'
];
foreach ($tests as $test) {
var_dump(sscanf($test, '%*[^£]£%f')[0]);
echo "\n";
}