将单反和双反引号替换为php中的打字机引号

I'm trying to single reverse and double reversed quote in PHP using str_replace method but its not getting replaced. I tried to convert it using htmlentities() and replace it using their html values but its not also working.

Here's the code:

$text = htmlspecialchars($text, ENT_QUOTES, "UTF-8");
$text = str_replace("‛", "'", $text);

2nd attempt:

$text = str_replace("‛", "'", $text);

Reference for single and double reversed quote: http://en.wikipedia.org/wiki/Quotation_mark_glyphs

@Eugene This should be the one. You forgot _decode.

$text = str_replace(htmlspecialchars_decode("‛"), "'", $text);

This should work:

$text = str_replace(htmlspecialchars("‛"), "'", $text);