Check out this code.
$bt = "abc8 • ";
echo $bt . "<P>";
$bt = rtrim($bt," • ");
echo $bt . "<P>";
$bt = "abc7 • ";
echo $bt . "<P>";
$bt = rtrim($bt," • ");
echo $bt . "<P>";
On my server, running PHP7.2, this returns,
abc8 •
abc
abc7 •
abc7
Why is the "8" being dropped in the first pair???
If I use the actual bullet symbol in the code, rather than the 8226 entity, it works fine.